Bug 47245: Comment out check and exception in case row-records are missing for some cells as it seems POI is handling this gracefully and LibreOffice/Excel are as well
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1732235 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2411273a57
commit
161ef55132
@ -209,12 +209,14 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
|
|||||||
hrow = getRow(cval.getRow());
|
hrow = getRow(cval.getRow());
|
||||||
lastrow = hrow;
|
lastrow = hrow;
|
||||||
if (hrow == null) {
|
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
|
// 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.
|
// Excel, OpenOffice.org and GoogleDocs are all OK with this, so POI should be too.
|
||||||
if (rowRecordsAlreadyPresent) {
|
if (rowRecordsAlreadyPresent) {
|
||||||
// if at least one row record is present, all should be present.
|
// if at least one row record is present, all should be present.
|
||||||
throw new RuntimeException("Unexpected missing row when some rows already present");
|
throw new RuntimeException("Unexpected missing row when some rows already present");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// create the row record on the fly now.
|
// create the row record on the fly now.
|
||||||
RowRecord rowRec = new RowRecord(cval.getRow());
|
RowRecord rowRec = new RowRecord(cval.getRow());
|
||||||
sheet.addRow(rowRec);
|
sheet.addRow(rowRec);
|
||||||
|
BIN
test-data/spreadsheet/47245_test.xls
Normal file
BIN
test-data/spreadsheet/47245_test.xls
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user