You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Icon-set conditional formatting assigns the wrong band to most cells: values land one band too low. In 10_kpi_tracker_en.xlsx the 3Arrows rule uses type="num" thresholds [0, 0.9, 1.0] (≥1.0 → green up, [0.9,1.0) → yellow side, <0.9 → red down), but office2pdf renders 107% (1.07) with the middle/yellow icon and 93% (0.93) with the low/red icon — one band below Excel.
Two root causes in the icon-set threshold path:
umya-spreadsheet drops the cfvo children. The <cfvo> elements are written as start/end tag pairs (<cfvo type="num" val="0.9"></cfvo>, openpyxl style); umya's IconSet reader only matches Event::Empty, so get_cfvo_collection() comes back empty (the same reader gap fixed for DataBar in fix: read dataBar cfvo and color children written as start/end tags MathNya/umya-spreadsheet#347). office2pdf then falls back to equal-thirds thresholds, which do not match the rule.
office2pdf ignores the cfvo type.apply_icon_set_rule computes every threshold as min_val + range * (val / 100), treating the value as a percentage. For type="num" the value is absolute (0.9 means 0.9), for type="percentile" it is a percentile — so even with the cfvos populated the thresholds would be wrong.
Reproduction
Convert an XLSX whose iconSet rule uses type="num" cfvos written as start/end tags and compare the per-cell icon band with an Excel PDF export.
Expected
Each cell's icon matches Excel's band for the rule thresholds (num/percent/percentile honored).
Actual
Bands fall back to equal-thirds and ignore the cfvo type, so most cells show an icon one band too low.
Fix direction
Parse the iconSet cfvo type+val list from the raw worksheet XML (office2pdf already extracts iconSet type there), and compute thresholds per cfvo type (num = literal, percent = min+range·val/100, percentile = percentile of the range, min/max = extremes). This bypasses the umya reader gap without a dependency bump.
Summary
Icon-set conditional formatting assigns the wrong band to most cells: values land one band too low. In
10_kpi_tracker_en.xlsxthe 3Arrows rule usestype="num"thresholds[0, 0.9, 1.0](≥1.0 → green up, [0.9,1.0) → yellow side, <0.9 → red down), but office2pdf renders 107% (1.07) with the middle/yellow icon and 93% (0.93) with the low/red icon — one band below Excel.Two root causes in the icon-set threshold path:
<cfvo>elements are written as start/end tag pairs (<cfvo type="num" val="0.9"></cfvo>, openpyxl style); umya'sIconSetreader only matchesEvent::Empty, soget_cfvo_collection()comes back empty (the same reader gap fixed forDataBarin fix: read dataBar cfvo and color children written as start/end tags MathNya/umya-spreadsheet#347). office2pdf then falls back to equal-thirds thresholds, which do not match the rule.apply_icon_set_rulecomputes every threshold asmin_val + range * (val / 100), treating the value as a percentage. Fortype="num"the value is absolute (0.9 means 0.9), fortype="percentile"it is a percentile — so even with the cfvos populated the thresholds would be wrong.Reproduction
Convert an XLSX whose iconSet rule uses
type="num"cfvos written as start/end tags and compare the per-cell icon band with an Excel PDF export.Expected
Each cell's icon matches Excel's band for the rule thresholds (num/percent/percentile honored).
Actual
Bands fall back to equal-thirds and ignore the cfvo type, so most cells show an icon one band too low.
Fix direction
Parse the iconSet cfvo
type+vallist from the raw worksheet XML (office2pdf already extractsiconSettype there), and compute thresholds per cfvo type (num = literal, percent = min+range·val/100, percentile = percentile of the range, min/max = extremes). This bypasses the umya reader gap without a dependency bump.Related
Related: #377, #367, #371