https://issues.apache.org/bugzilla/show_bug.cgi?id=54647
Bug ID: 54647
Summary: addConditionalFormatting fails for whole column ranges
Product: POI
Version: 3.9
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Created attachment 30024
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30024&action=edit
Test code that demonstrates the bug
Although CellRangeAddress supports whole column ranges like A:A and Excel
supports it for conditional formatting, POI throws the following exception in
case you try to do it (e.g. using CellRangeAddress.valueOf("A:A"))
Exception in thread "main" java.lang.IllegalArgumentException: Minumum row
number is 0
at
org.apache.poi.ss.util.CellRangeAddressBase.validateRow(CellRangeAddressBase.java:63)
at
org.apache.poi.ss.util.CellRangeAddressBase.validate(CellRangeAddressBase.java:51)
at
org.apache.poi.hssf.usermodel.HSSFSheetConditionalFormatting.addConditionalFormatting(HSSFSheetConditionalFormatting.java:139)
at
org.apache.poi.hssf.usermodel.HSSFSheetConditionalFormatting.addConditionalFormatting(HSSFSheetConditionalFormatting.java:172)
at
org.apache.poi.hssf.usermodel.HSSFSheetConditionalFormatting.addConditionalFormatting(HSSFSheetConditionalFormatting.java:182)
at
TestConditionnalFormatWholeColumn.main(TestConditionnalFormatWholeColumn.java:18)
(the same test is also done for XSSF so I suppose it is also affected)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]