Summary: | Exception in ExternSheetRecord while setting Repeating Rows and Columns | ||
---|---|---|---|
Product: | POI | Reporter: | Rich Renomeron <rich.renomeron> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | poi-support |
Priority: | P2 | ||
Version: | 3.0-dev | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | other | ||
Attachments: |
Spreadsheet that causes the exception
Java code for testing Output from non-crashing code updated test case to generate foobar.xls attachment (now writes output) patch to fix this problem |
Description
Rich Renomeron
2006-09-19 16:50:58 UTC
Created attachment 18886 [details]
Spreadsheet that causes the exception
Here's an example spreadsheet that causes the exception when
HSSFWorkbook.setRepeatingRowsAndColumns() is run on it.
Created attachment 18887 [details]
Java code for testing
Java class that shows the error. Run the example spreadsheet with this.
Created attachment 19333 [details]
Output from non-crashing code
This is the output from my patch that I will commit shortly.
Created attachment 19334 [details] updated test case to generate foobar.xls attachment (now writes output) Updated test case based on attachment 18887 [details] which takes output file (and writes it) The problem was caused by HSSF set Repeating Rows/Cols function (BTW that function has a repugnantly cryptic interface, we should make friendlier helper functions that do the -1 magic for you). It didn't take into account "global" "NAME" records with a "0" in field 6 (thus we ended up looking for sheet record -1). this patch ignores globals when using the extern sheet ref function. Created attachment 19335 [details]
patch to fix this problem
patch that fixes problem (committed after further testing)
(fix to fulfill a bunisoft support contract) Assuming that this is fixed. HSSFWorkbook has been refactored and this patch whether actually applied or not, is no longer relevant. Please advise if this needs further work. |