As part of testing issue
#705, I discovered that the macro is preserved but has a slightly different behavior. The currency formatting in the pivot table that is generated by the macro is no longer preserved.
This worked in openpyxl 2.2.1 but was broken in 2.3.5 and is also not working with the change made in
The test files attached to
#705 can be used to reproduce the issue:
using Python 3.4 and openpyxl 2.2.1
- execute xl_text.py (make sure the xlsm is in the same directory).
- open test_result.xlsm
- Enable the macro to run.
- Notice that column D (Sum of Balance) in the pivot table has the currency formatting.
Repeat the steps 1-3 using openpyxl 2.3.5 or greater. Note that column D (Sum of Balance) longer has the currency formatting.