We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cells Style property

Dear Aspose support team,

Please see the below code, and advise me if i could implement the style property for the cell.

CellArea area = xlObj.ExcelWorkBook.Worksheets["Pivot By Region"].PivotTables[0].TableRange1;

int startRow = area.StartRow;

int startColumn = area.StartColumn;

int endRow = area.EndRow;

int endColumn = area.EndColumn;

Style styleCell = xlObj.ExcelWorkBook.Worksheets["Pivot By Region"].Cells.Columns[endColumn].Style;

styleCell.Number = 9;

StyleFlag styleFlagCell = new StyleFlag();

styleFlagCell.Borders = true;

styleCell.Font.IsBold = true;

styleFlagCell.NumberFormat = true;

xlObj.ExcelWorkBook.Worksheets["Pivot By Region"].Cells.Columns[endColumn].ApplyStyle(styleCell, styleFlagCell);

Now, my problem is that, the assigned style, is not implemented in the Excel sheet. I don't understand, why it works for ordinary Cell and not working for the Pivot table cells or columns.

Please advise me how to attain the solution for implementing the style property for the columns.

Thank you

Suchindhraa

Hi Suchindhraa,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, currently Aspose.Cells doesn’t support the style property for the Columns in the Pivot Table. So, the style you are setting for the columns in the Pivot Table will not be applied.

Thank You & Best Regards,