]> source.dussan.org Git - poi.git/commitdiff
Bug 47245: Comment out check and exception in case row-records are missing for some...
authorDominik Stadler <centic@apache.org>
Wed, 24 Feb 2016 22:39:11 +0000 (22:39 +0000)
committerDominik Stadler <centic@apache.org>
Wed, 24 Feb 2016 22:39:11 +0000 (22:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1732235 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
test-data/spreadsheet/47245_test.xls [new file with mode: 0644]

index b6ad9c9be0beac93df55f5035313ceee6eacdd44..eb097c62e56f4c3b741dbef319266c95171eb9fa 100644 (file)
@@ -209,12 +209,14 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
                 hrow = getRow(cval.getRow());
                 lastrow = hrow;
                 if (hrow == null) {
+                    /* we removed this check, see bug 47245 for the discussion around this
                     // Some tools (like Perl module Spreadsheet::WriteExcel - bug 41187) skip the RowRecords
                     // Excel, OpenOffice.org and GoogleDocs are all OK with this, so POI should be too.
                     if (rowRecordsAlreadyPresent) {
                         // if at least one row record is present, all should be present.
                         throw new RuntimeException("Unexpected missing row when some rows already present");
-                    }
+                    }*/
+
                     // create the row record on the fly now.
                     RowRecord rowRec = new RowRecord(cval.getRow());
                     sheet.addRow(rowRec);
diff --git a/test-data/spreadsheet/47245_test.xls b/test-data/spreadsheet/47245_test.xls
new file mode 100644 (file)
index 0000000..2e30bd5
Binary files /dev/null and b/test-data/spreadsheet/47245_test.xls differ