Bug 61648 - setArrayFormula does not work when creating a SXSSFWorkbook
Summary: setArrayFormula does not work when creating a SXSSFWorkbook
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.17-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-23 08:38 UTC by torsten
Modified: 2018-01-01 14:52 UTC (History)
0 users



Attachments
example to create a valid (XSSFWorkbook) and a invalid (SXSSFWorkbook) workbook (2.61 KB, text/plain)
2017-10-23 08:38 UTC, torsten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description torsten 2017-10-23 08:38:00 UTC
Created attachment 35448 [details]
example to create a valid (XSSFWorkbook) and a invalid (SXSSFWorkbook) workbook

If a workbook of type SXSSFWorkbook is created with a array formula, the workbook will contain invalid data.
Comment 1 Dominik Stadler 2017-12-28 13:36:23 UTC
It fails because currently SXSSFSheet tries to use XSSFSheet for storing the array formulas, but this causes rows to be created in the sheet at SXSSFSheet._sh  and this way some rows are written twice to the sheetX.xml file.

Full support for array formulas is likely some more work as they will need to be kept in the SXSSFSheet and "merged in" whenever normal rows are written to the xml-file instead of being added to the XSSFSheet.
Comment 2 Dominik Stadler 2018-01-01 14:52:33 UTC
With r1819770 we throw an "Unimplemented" Exception when you try to set an array formula for SXSSF to make this more visible instead of creating corrupt files.