aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-05-02 15:49:23 +0000
committerNick Burch <nick@apache.org>2014-05-02 15:49:23 +0000
commit1bf21ef3f93280b669c331d16be5003a77011893 (patch)
tree5cb7195fff0a649c89043da649ec12fc6e008566 /src/testcases/org/apache/poi
parentaef0863d265c95ed161ce1bb6fe6f789bdfe143c (diff)
downloadpoi-1bf21ef3f93280b669c331d16be5003a77011893.tar.gz
poi-1bf21ef3f93280b669c331d16be5003a77011893.zip
Excel 2007 and later allows for more than 3 Conditional Formatting rules per sheet, so change our hard limit to logging a compatibility warning. Test file from Pau Coma Ramirez from bug #56482
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1591959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index 16d8e208b6..197531965d 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -2565,4 +2565,18 @@ public final class TestBugs extends BaseTestBugzillaIssues {
}
assertEquals(0, comments);
}
+
+ /**
+ * Files initially created with Excel 2010 can have >3 CF rules
+ */
+ @Test
+ public void bug56482() {
+ HSSFWorkbook wb = openSample("56482.xls");
+ assertEquals(1, wb.getNumberOfSheets());
+
+ HSSFSheet sheet = wb.getSheetAt(0);
+ HSSFSheetConditionalFormatting cf = sheet.getSheetConditionalFormatting();
+
+ assertEquals(5, cf.getNumConditionalFormattings());
+ }
}