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

Free Support Forum - aspose.com

Pivot table style issue (v.5.3.2)

Hello.


PivotTableStyleType doesn’t work if a workbook is saved in .xls format, but does for .xlsx. A sample project is attached.

Dima.

Hi Dima,


Thank you for your reporting and sample application. We are able to reproduce the said issue on our end, so we have logged it in our Bug Tracking System under ID CELLSNET-26080. Soon we’ll get back to you on this.

Hi,

Well, I think the reason is simple. You are using a line in your code (in your project) i.e…,
//apply styling
pivotTable.PivotTableStyleType = PivotTableStyleType.PivotTableStyleLight16;
Note: PivotTableStyleType enum refers to Excel 2007/2010 XLSX formatting styles that are not supported in XLS (Excel 97-2003) format.

If you need to apply pivot table formatting for XLS file format, you may use the limited AutoFormatType styles, e.g
pivotTable.AutoFormatType = PivotTableAutoFormatType.Report1;

Thanks for your understanding!

Thanks for the advice.

But PivotTableAutoFormatType doesn't cover style requirements we have.
By the way, I can save .xlsx file created by the Aspose library as xls using Excel and PivotTableStyleType.PivotTableStyleLight16 is still applied.
So it seems that PivotTableStyleLight16 style is ok with xls format.

Dima.

Hi,

Thanks for pointing it out.
I noticed it. I can re-save the .xlsx file (created by the
Aspose.Cells) as xls using Excel and
PivotTableStyleType.PivotTableStyleLight16 is still applied in xls
format. I am afraid, we do not support this enhancement at the moment. I have logged the feature enhancement as an id: CELLSNET-26102. We will look into it later on.

Thank you.

@ShmelP,

We supported the feature (create, manipulate and refresh Pivot Tables in XLS/XLSX (MS Excel 2007 - 2019)) with enhancements in newer versions. We recommend you to kindly upgrade to and give it a try to latest version of Aspose.Cells. Also, see the document for your reference:
Create Pivot Tables and Pivot Charts