-
Notifications
You must be signed in to change notification settings - Fork 695
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Conditional Formatting for worksheet #33
Comments
I'm interested in this feature. I started working on it in my fork (progress so far), but I have a couple of questions.
As an example, here's what Excel on Mac generates (closing
|
@scpike woot! RE: 1) Absolutely perfect.
It is basically a container node for Models for all of those objects are already in the stylesheet directory, I just never got around to making a dxf class :( The last step would be adding adding an option for add_style to mark the style as differential and return the dxfs index so when you create your conditional_formatting_rule, you have an dxfId. In the mean time, please send in a pull request for your stuff! |
…ting New Dxf class implements 18.8.14. Conditional formatting now "works". Add :type option to add_styles, defaults to :xf when add_styles is called with :dxf type, new styles are not added to the global @Styles set. Dxf child elements only exist inside the `<dxf>` chunk. Added tests and an example.
I did some more work on this today, and Dxf elements now exist. I think all the commits got automatically added to the pull request I sent earlier. I did a bunch of messing around with Styles#add_style so that styles for Xf elements continue to get put inside With the most recent commits I'm able to create .xlsx files with working conditional formatting (see examples/example_conditional_formatting.rb). We're still missing support for dataBar, colorScale, and iconSet child elements of ConditionalFormattingRule, which aren't that important to me. |
@scpike This is really great work mate. You now have full access to the repo so when you run into something you want, please don't hesitate to add it in. I am really impressed with the quality of your work. I've set you up with direct access to the repo. If you ever have any questions you can usually find me lurking in #axlsx (the ci environment for this gem reports there) or #travisci on freenode. I just plugged in colorScale and will knock off dataBar and iconSet today as well so we can call it done (until someone reports a bug of course!) That Style#add_style method does indeed need a bit of love - but I am so impressed with this I think I'll release it next week with a blog post! Let me know your twitter handle if you have one. |
It is all implemented - but we need some testing help! After spending a few hours to build in icon set, data bar and color scale - only to find out that my crappy 2007 Mac version tells me very politely that it does not support those conditional formats. Any out there have a windows version handy to do some testing? No validation errors or fix errors so the data should be clean - just cant verify if it actually works... |
@randym Thanks for the compliment, you really know who to make a guy want to contribute! I have Excel for Mac 2011, which supports icon set, data bar, and color scale. They worked with no errors, but the Icon set showed all green lights. I modified IconSet#initial_value_objects to have three based on percentages, so our default now matches the example in 18.3.1.49, and got a much nicer looking thing. |
That is AWESOME! |
18.3.1.10 cfRule (Conditional Formatting Rule)
The text was updated successfully, but these errors were encountered: