openpyxl 2.6 does not preserve conditional formatting
Created originally on Bitbucket by tadeboro (Tadej Borovšak)
Summary
When loading the workbook that contains cells with multiple conditional formatting conditions, only the last one seems to be loaded.
How to replicate
- Download attached xlsx file that has a cell with 2 conditional formatting conditions.
- Load and save workbook using openpyxl.
Expected outcome
Newly saved file has the same conditions as the original.
Actual outcome
Newly saved file contains only last condition.
Minimal example that demonstrates the issue
#!python
import openpyxl
wb = openpyxl.load_workbook("test.xlsx")
wb.save("newtest.xlsx")
Notes
This same procedure works with latest openpyxl 2.5.x.
Attachments: test.xlsx