Existing charts in excel document get whiped out if I open and save this document with openpyxl
Created originally on Bitbucket by Agent Smith (Mike S)
Hello! When I open and save an Excel spreadsheet with openpyxl, all charts that were there getting lost.
Consider this simple code where I load in.xlsx file using openpyxl and then save it right away to out.xlsx:
#!python
from openpyxl import load_workbook
input_file = "in.xlsx"
output_file = "out.xlsx"
wb = load_workbook(input_file)
wb.save(output_file)
Attaching sample file "in.xlsx"
When I run this code, everything from in.xlsx gets saved to out.xlsx except for charts.
Attachments: in.xlsxtest.xlsxinput.xlsx