Pivot Chart from xlsx file is being modified to Normal Chart when saved
Created originally on Bitbucket by Waldo Boshoff
Using 2.6.1
Process we follow to mimic a small reporting engine on our database using openpyxl:
-
Open template.xlsx file which contains presetup pivots reading from a empty datasheet and charts linked to those pivots (pivotcharts) to create an excel dashboard.
-
Using openpyxl to populate the datasheet with data from a specified query
-
Closing up the modified xlsx and allowing the user to download and open the workbook
-
On open the Pivot will refresh (setting on pivot table) and pull in the new data in to the pivot. Up to this point everything works
-
The charts linked to the pivot however suddenly become unlinked, and now reference only a portion of the original pivot table, skewing the view of the pivot table.
Any ideas on how to keep the pivot chart referencing the pivot to update with the pivot when it is refreshed on open?
Attachments: test_input.xlsxtest_output2019-03-16T09_50_46.929578.xlsx