- Notifications
You must be signed in to change notification settings - Fork1.9k
Fixed conditional format corrupting sheet #1305#1574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fixed conditional format corrupting sheet #1305#1574
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mitchellwagner commentedMar 2, 2021
I can confirm that this fixes the issue with conditional styling and the corruption of the worksheet |
Siemienik left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I confirm that the new order is correct:
https://github.com/exceljs/ooxml-xsd/blob/aba7f40dc52d9a3cfe236e9e3e15a5148d5ca999/sml-styles.xsd#L830-L868
Thank you for that great contribution! 🥇 LGTM.
Summary
I'm using a template for styling, and filling out data with ExcelJS. When my template had conditional formatting enabled on it, opening it and writing the file (even without data being inserted) would corrupt the file and lose styling. While investigating the issue I ran intothis comment I tried it and it worked, and since I wasn't able to find a PR mentioning this fix I decided to open one myself.
Test plan
My original template file's conditional formatting:
After being loaded by ExcelJS and rewritten into a different file:
Notes
I understand the README.md mentioned writing tests for all fixes but I'm not really familiar with it, I can write them if someone could point me in the right direction.