https://issues.apache.org/bugzilla/show_bug.cgi?id=45066
Summary: Sheet.getSize() returns wrong value when UncalcedRecord
is present
Product: POI
Version: 3.0-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
This bug is one of a few noticed while working on bug 45046.
Inspection of Sheet.getSize() and Sheet.serialize() shows that the presence of
UncalcedRecord is handled differently. The discrepancy causes wrong offset
values to be encoded into BoundSheetRecord. If there is more than one sheet,
Excel will report errors and loose data when trying to open the book.
To reproduce: Create a spreadsheet in Excel with 2 sheets. Change the workbook
settings for 'recalculation' to 'manual' and uncheck the 'recalculate before
save' option. Add any formula to the first sheet. Save. Read with POI and
write back. Open in Excel. boom.
Perhaps the biggest problem here is that HSSFWorkbook asks all the sheets for
their sizes, but then doesn't care how much space they take when they are
serialized.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]