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

Free Support Forum - aspose.com

How to set Subtotal Row in Bold letters for PivotExcel sheet

Hi Sir,

I am using Aspose 8.3.0
I have a requirement of setting the Subtotals row as bold in my pivot excel sheet
I need to set that subtotal row at bottom
fot that I used below snippet for that
pivotField.setShowSubtotalAtTop(false); //working fine
but I need to set that field as bold

Can you help me in this regard…


Hi Vishnu,

Thank you for contacting Aspose support.

Please use the PivotTable.format(int RowIndex, int ColumnIndex, Style StyleObject) method to format a particular cell of a PivotTable. As you wish to format a whole row, you may use the above mentioned method in a loop in order to set Style (bold) to a complete row.

In case you face any difficulty, please share your input spreadsheet (having the Pivot Table) for further assistance.


Style style = workbook.createStyle();
pivotTable.format(row, col, style);

Note: You need to refresh & recalculate the Pivot Table before applying the style therefore you should call PivotTable.refreshData & PivotTable.calculateData methods before formatting Pivot Table.