I am trying to apply a RowStyle to a row containing column subtotals. The columns are subtotaled by inserting a row below the last row to be included in the subtotal and then applying a formula to each cell in columns with subtotals. After applying the formulas to the cells (which correctly subtotals the values), I use Cells.ApplyRowStyle() and supply the row index and a style with Font.IsBold = true and a StyleFlag { All = true, IsBold = true }. The first cell in the row is bolded, but none of the formula cells are bolded.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please provide us your runnable sample code and the source file to look into this issue. We will investigate this issue at our end and advise you asap.
Please also see the following documentation article that illustrates how to format rows or columns using the ApplyStyle() method.
http://www.aspose.com/docs/display/cellsnet/Formatting+Rows++and++Columns
I’ve attached the source file for your review though I don’t know how you would like me to create a working sample project. On line 92 is AddSubTotalRows(…) and on lines 122-124 it should be bolding any rows inserted in this function. What is happening is that the first column in the row is bolded and no other cells in the column are bold.
Hi,
Thanks for your posting and using Aspose.Cells.
Could you change your following line of code like the one shown below and see if it works fine?
worksheet.Cells.ApplyRowStyle(currentRowIndex + offSet, rowStyle, new StyleFlag { All = true, FontBold = true});
into
worksheet.Cells.ApplyRowStyle(currentRowIndex + offSet, rowStyle, new StyleFlag { FontBold = true});
If your problem still persists, then please provide us simplified sample code with your source file, output file and expected output file. We will look into your issue soon and advise you.
That fixed the issue. Thank you!