Hi,
We tried to sort a pivot column (containing days of the week), but the output PDF file does not have the column sorted correctly.
I have attached a small project to demonstrate the issue I have also attached an input file “input file with day of the week in pivot.xlsx”
that you can use with the project. The code simply opens the input
file, go through all worksheets and refresh all pivot tables inside
each worksheet before saving the workbook as “generated file.pdf”.
I have attached a couple of screenshots to show the issue.
1: “day of week order in Excel.png” which shows what the order looks like in Excel.
2: “output with the day in the wrong order.png” which shows what the pivot table look like in PDF.
ADDITIONAL INFORMATION:
We
had an issue where we could not sort months correctly in generated PDF
files; we have since found a workaround to keep the sort correct. The
workaround is as follows:
- Change the data type of the whole month column in the data source; setting it as "Date"
- Refresh the pivot table.
- Set the month column in the pivot table as “Date” type too.
Following
the steps above keeps the sorting on our generated PDF file even after
changing the content and size of the data source.
However, when we try this with the day of the week i.e. Monday, Tuesday, Wednesday, etc like if you use this other input file “input file with day of week in pivot with data type set.xlsx” we end up with a PDF file containing a pivot table as shown in the “output with day repeated instead.png”.