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

Free Support Forum - aspose.com

Pivot Tables Style property

Hi Aspose support team,

Can anyone please advise me in setting the style property of a pivot table. I need to assign certain style for the pivot column fields.

I tried with Range.Style and range.applystyle() methods, but failed.

Is it possible.

Thanks

Suchindhraa

Hi Suchindhraa,

Thanks for your inquiry.

Well, you may try to use PivotField.Number property to set an integer value for number formats or PivotField.NumberFormat property to assign a custom formatting string for your need.

e.g..,

pivotTable.DataFields[0].NumberFormat = "$#,##0.0000";

Thank you.

Dear Aspose support team,

My requirement is that, i need to change the appearance of the pivot table. I need to fix some color for the Row fields and column fields.

I tried PivotTable.AutoFormatType method, but i'm not satisfied with the appearance. Can you advise me if there is any other method to fix the colors for the Column headers of a pivot table.

Also, i need to align the data fields in the centre of the cell, with thin borders for all the cell. Please let me know how to achieve this feature.

Thankyou.

Regards,

Suchindhraa

Hi Suchindhraa,

I think you should accomodate PivotTable.AutoFormatType attribute for your need. I 'm afraid your requirements cannot be fulfilled currently. The reason is simple Aspose.Cells for .NET does not support to calculate / manipulate the pivot table data, it only forces MS Excel to refresh the pivot table data when MS Excel opens the generated file (generated by Aspose.Cells for .NET). So, consequently, we cannot suppot to set the colors for the column headers and set alignment for the cells in the pivot table as well.

And we have no such plans to support the features currently, we will look into it after a while.

Thanks for your time and understanding.