pull-requests #378 fix style sheet color lost after open and save
Created originally on Bitbucket by 王 强
pull-requests #378 fix style sheet color lost after open and save
sorry, I can’t upload example.xlsx ,so i create an issue 。
# coding=utf-8
# openpyxl-3.0.3
from openpyxl.reader.excel import load_workbook
wb = load_workbook(filename='example.xlsx', read_only=False, keep_vba=False, data_only=False, keep_links=True)
wb.save('new_document.xlsx')
wb.close()
after code ,we lost border’s color
it looks like below pictures
in fact , we lost all custom color if the color is stored in style.xml if it is indexedColors
the font’s color , cell’s background color ….
that’s we don’t load correct indexedColors
and don’t save them.
Attachments: example.xlsxsample.xlsx