charts blank randomly on Excel
hello, I'm currently writing an application that write excel files using pandas/openpyxl. i add several scatter charts in separate chartsheets. i have 24 charts (and 24 chartsheets) and 25 worksheet for the datas. all seems to be ok, but once i open the file in Excel (office 365 version 2210) some chart sheets are fully blank.
if I "open" (selecting) all chart sheets, save the excel file, close excel, then reopen again the file, all chart sheets are now well displayed..
it seems something breaks excel showing the charts
i have checked the differences inside the xlsx file before and after resaving it with excel.. there are so much small differences..
- the charts doesn't have the numCache fields, (tryed to add them in my code, but nothing change..)
- the xml "tags" doesn't have the same format (eg: <c:scatterChart> (Excel output) vs (openpyxl output)
- no xml header () in openpyxl output
- many other small things..
I spent lots of time but haven't find exactly where is the issue.
i attached 1 file with the issue. e0e2e64f1f80_6_report_20221113-201142.xlsx
Hereunder my configuration (it's running in a docker/amd64 on windows). I also just tested with older versions of pandas (1.2.5) and openpyxl (2.6.4) and get the same issue..
# python --version Python 3.9.15
# pip freeze anyio==3.6.2 asyncio-mqtt==0.13.0 azure-iot-device==2.12.0 certifi==2022.9.24 charset-normalizer==2.1.1 click==8.1.3 deprecation==2.1.0 et-xmlfile==1.1.0 fastapi==0.86.0 filelock==3.8.0 h11==0.14.0 httptools==0.5.0 idna==3.4 janus==1.0.0 lxml==4.9.1 numpy==1.23.4 openpyxl==3.0.10 packaging==21.3 paho-mqtt==1.6.1 pandas==1.5.1 pydantic==1.10.2 pyparsing==3.0.9 PySocks==1.7.1 python-dateutil==2.8.2 python-dotenv==0.21.0 pytz==2022.6 PyYAML==6.0 redis3==3.5.2.3 requests==2.28.1 requests-unixsocket==0.3.0 scipy==1.9.3 six==1.16.0 sniffio==1.3.0 starlette==0.20.4 transitions==0.9.0 typing_extensions==4.4.0 urllib3==1.26.12 uvicorn==0.19.0 uvloop==0.17.0 watchfiles==0.18.1 websockets==10.4