Skip to content

fix style sheet color lost after open and save

Bitbucket Importer requested to merge bitbucket/declined-pr-378 into branch/default

Created originally on Bitbucket by 王 强

Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.

use the code

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()

colors in styles.xml lost

<colors>
<indexedColors>
<rgbColor rgb="ff000000"/>
<rgbColor rgb="ffffffff"/>
<rgbColor rgb="ffff0000"/>
<rgbColor rgb="ff00ff00"/>
<rgbColor rgb="ff0000ff"/>
<rgbColor rgb="ffffff00"/>
<rgbColor rgb="ffff00ff"/>
<rgbColor rgb="ff00ffff"/>
<rgbColor rgb="ff000000"/>
<rgbColor rgb="ffffffff"/>
<rgbColor rgb="ffaaaaaa"/>
<rgbColor rgb="ff0000ff"/>
<rgbColor rgb="ffff0000"/>
<rgbColor rgb="ff0070c0"/>
<rgbColor rgb="ff99ccff"/>
<rgbColor rgb="ffc0c0c0"/>
<rgbColor rgb="ffccffff"/>
<rgbColor rgb="ff993366"/>
<rgbColor rgb="ffff00ff"/>
</indexedColors>
</colors>

Merge request reports