Bug 43623 - vector row unsupported
Summary: vector row unsupported
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-FINAL
Hardware: PC Windows XP
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2007-10-15 03:58 UTC by Michal Jacykiewicz
Modified: 2008-08-31 09:41 UTC (History)
0 users

a spreadsheet that contains a vector defined (13.50 KB, application/octet-stream)
2007-10-15 04:00 UTC, Michal Jacykiewicz
output spreadsheet with a broken structure (13.00 KB, application/octet-stream)
2007-10-15 04:00 UTC, Michal Jacykiewicz
Excel's error message screenshot (3.96 KB, image/png)
2007-10-15 04:01 UTC, Michal Jacykiewicz
diff on BiffViewer output ran on good xls vs. broken one (16.53 KB, text/plain)
2007-10-15 05:27 UTC, Michal Jacykiewicz

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jacykiewicz 2007-10-15 03:58:46 UTC
Vector row seems to be unsupported in poi-3.0.1-FINAL-20070705.

To reproduce: load a spreadsheet and then immediately write it back to a file 
system - without making any modifications to it's structure.
E.g. by
new HSSFWorkbook(new FileInputStream(inFileName)).write(new 

If the source spreadsheet contains a row vector, the newly created 
spreadsheets's structure seems to be broken: Excel refuses to open it - with 
"File error: data may have been lost" message.

Excel 2003 (11.8146.8132) SP2.

Example spreadsheets attached.

To create a row vector e.g. for SIN function, type a function name, provide an 
array of arguments, then press 'enter'. Then select the cell, then extend the 
selection to include more cells, press F2, then ctrl+shirt+enter - the vector 
with the result will be created.
Comment 1 Michal Jacykiewicz 2007-10-15 04:00:14 UTC
Created attachment 20978 [details]
a spreadsheet that contains a vector defined
Comment 2 Michal Jacykiewicz 2007-10-15 04:00:52 UTC
Created attachment 20979 [details]
output spreadsheet with a broken structure
Comment 3 Michal Jacykiewicz 2007-10-15 04:01:28 UTC
Created attachment 20980 [details]
Excel's error message screenshot
Comment 4 Nick Burch 2007-10-15 04:10:15 UTC
You might want to use the dev tools (poifs.dev.POIFSViewer and
hssf.dev.BiffViewer in particular) to try and spot what records are getting
corrupted. Knowing what records are involved will make it easier to fix, and
also easier to figure out how much work would be involved in fixing it
Comment 5 Michal Jacykiewicz 2007-10-15 05:27:48 UTC
Created attachment 20981 [details]
diff on BiffViewer output ran on good xls vs. broken one

Nick, I'm unable to spot 'corrupted records' here I'm afraid, as don't know the
biff format. But that diff I've atteched may someone to spot it. Thx.
Comment 6 Nick Burch 2008-07-10 14:05:16 UTC
I've just re-tried with svn trunk (r675734, not long after 3.1 final)

We are not able to process the formulas properly, as we're not doing the right thing with the ExpPtgs. There's now a disabled test in hssf.usermodel.TestBugs, so we can test fixes against that
Comment 7 Josh Micich 2008-08-31 09:41:06 UTC
Fixed with bug 26321 (svn r690636).

POI now does round trip re-serialization of workbooks with ArrayRecords and/or
TableRecords without introducing errors.

However, POI is still not able to create/edit Array or Table formulas.