Repository navigation
Conversation
…rytold#1160) An icon set threshold is ">=" by default or ">", stored as gte="0" on its cfvo. GridCraft ignored gte and compared with ">=", so a value exactly on a ">" threshold got the next icon (Excel for Microsoft 365, 3 traffic lights over 0..10 with "> 3", "> 6": 3 is red and 6 yellow; GridCraft showed yellow and green). CfRule::IconSet keeps a per-threshold `greater` flag (serde default, empty = all ">="); the reader takes gte, the writer writes gte="0", the evaluator compares with ">" where it is set, and home.conditionalFormat takes icon thresholds: [{type, value, operator: ">=" | ">"}]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAgnkqJiy3v24Hp25dQLRj
This was referenced Oct 13, 2026
Author
|
Closing this pull request. #1160 describes the problem; its new comment adds the fix approach and Excel's read-back. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1160: icon set thresholds with ">" were evaluated as ">=".
Problem
In Excel, each icon threshold is ">=" (the default) or ">". The file stores ">" as
gte="0"on the threshold'scfvo. GridCraft ignoredgte, so a value exactly on a ">" threshold got the next higher icon. Saving the file then dropped thegte.Measured in Excel for Microsoft 365, 3 Traffic Lights over 0…10:
Fix
CfRule::IconSetgetsgreater: Vec<bool>, one flag per threshold (same index asthresholds). It has a serde default, and an empty list means every threshold is ">=", so existing rules and saved state are unchanged.gtefrom eachcfvo;gte="0"where a flag is set, also when the lower bound is left out and gets prepended.cf.rs): compares with>where the flag is set.home.conditionalFormattakes icon thresholds, which it had no parameter for:{"type": "iconSet", "thresholds": [{"type": "num", "value": 3, "operator": ">"}, …]}. List them from the lowest up, one per icon after the first; one per icon with the lower bound first, as in the file, works too.Testing
icon_thresholds_with_greater_than(engine): the table above, plus ">=" for comparison, through the command.icon_set_greater_than_thresholds_roundtrip(xlsx):gte="0"is written on the rightcfvoand read back.full_roundtrip: its icon set now carries ">" thresholds and still compares equal.> 3and> 6opens withIconCriteria(2..3).Operator = xlGreater.cargo xtask ci: fmt, clippy, test, assets, layers and wasm pass.parityandkeytipsreport their generated files out of date on this Windows checkout (core.autocrlf).git diffis empty, as onmain.Conflicts: #781 also adds a field to
CfRule::IconSet, so whichever PR lands second needs a one-line merge.The New Formatting Rule dialog (#1202, fixes #1165) builds on this branch, so this PR should merge first.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SAgnkqJiy3v24Hp25dQLRj