Skip to content
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

Feature request: stop_if_true for conditional formatting #386

Closed
cavlc opened this issue Oct 19, 2016 · 5 comments
Closed

Feature request: stop_if_true for conditional formatting #386

cavlc opened this issue Oct 19, 2016 · 5 comments
Assignees

Comments

@cavlc
Copy link

@cavlc cavlc commented Oct 19, 2016

Thank you very much for your outstanding work.

I found xlsxwriter missing two conditional format-related features, so I made a little revision to add these two features:

Icon_set: Displays the specified icon in the data cell according to the specified condition. #387

Stop_if_true: Once the conditional formatting is met, the subsequent conditional formatting in the list is no longer checked.

I am a novice in python and I do not have software engineering experience. These codes do work but they are not satisfacting, so would you be so kind as to add these two features into the new version?

very grateful.

Attachments to
example.zip
worksheet.py revision and demo (Python 3.5 xlsxwriter 0.8.4)

@jmcnamara
Copy link
Owner

@jmcnamara jmcnamara commented Oct 19, 2016

Hi @cavlc,

Thanks for the input.

The stop_if_true feature is in the Perl module so I can port that across.

As for the Icon Sets, that is a separate feature request so you should open a separate feature request issue for that. That allows me to track progress separately.

John

@CloudMichaelW
Copy link

@CloudMichaelW CloudMichaelW commented Mar 9, 2017

I'm interested in the stop_if_true for conditional formatting too! I have several conditions that I'm applying to a range of cells and would love it to stop on the first condition or be able to assign a priority/precedence. I am trying to format a cell with two different options and one overrides the other.
See attached sample code
Sample_XLSXWriter_Code.txt

@jmcnamara jmcnamara changed the title Feature request:Icon_set and stop_if_true for conditional formatting Feature request: stop_if_true for conditional formatting Sep 5, 2017
jmcnamara added a commit that referenced this issue Sep 5, 2017
Issue #386.
@jmcnamara
Copy link
Owner

@jmcnamara jmcnamara commented Sep 5, 2017

Added stop_if_true feature in version 0.9.9: https://xlsxwriter.readthedocs.io/changes.html

@jmcnamara jmcnamara closed this Sep 5, 2017
@MichaelCloud
Copy link

@MichaelCloud MichaelCloud commented Sep 11, 2017

Thanks for the update!

@jmcnamara
Copy link
Owner

@jmcnamara jmcnamara commented Sep 11, 2017

Just to note that although I implemented this, for completeness, I'm not sure it is actually required in Excel 2007 since precedence can be set using the order in which the rules are applied.

The Office documentation on Conditional Formatting Precedence suggests that is mainly to support backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.