We have just found out that the header for “Compact form” of a pivot table is actually different from the headers from “Outline form” and “Tabular form”. By this I mean if you started with a pivot table in “Tabular Form” with two columns and you change these columns to be called “First” and “Second”…Changing the pivot table to be “Compact Form” through PivotTable Tools/Design/report Layout/Show in Compact Form the header in the now one and only column is different (it is not using any of the new header names).
We now know this is an Excel feature. Probably because all of the columns are combine into one, and likely needs to have a different header.
The issue is that when we convert the file to PDF through Excel…the correct header is used when the pivot table is in “Outline” or “Tabular” forms. When we try to convert the file using Aspose.Cells.Save() the generated PDF is still using the "Compact Form"s column header as the header in the first column of the “Outline Form” pivot table.
I have attached a small project to demonstrate the issue. I have also attached an input file “input file with different headers.xlsx”. Note that the input file contains a tabular pivot table with two columns “First” and “Second” but the compact form of the pivot table has a header “Compact Header”.
When you run the code in the small project, it will refresh all pivot tables in the input file before saving it as “generated file.pdf”. If you open the generated file, you can see that the first column says “Compact Header” instead of “First”.
I have also attached a couple of screenshots to help explain the issue.
Thanks for your posting and using Aspose.Cells for .NET.
We have checked this issue by running your project. The generated pdf shows the column that says compact header instead of first. We have logged this issue in our database for investigation. We will look into it and resolve this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-41912.
Thanks for using Aspose.Cells.
Please download and try the latest version: Aspose.Cells
for .NET v22.214.171.124.