2
votes

I have an xlsx with 2 worksheet. In the first sheet I have an Excel pivot, in the second one the data source for the pivot table. I would like to modify the data source via python keeping the pivot structure in the other sheet.

Opening the woorkbook with openpyxl I lost the pivot table, does anyone know if there is an option to avoid this behaviour?

1

1 Answers

0
votes

Use the openpyxl package version 2.5 above, the function to keep the pivot table format is only available from the 2.5 release onward.