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 FileOutputStream(outFileName)); 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.
Created attachment 20978 [details] a spreadsheet that contains a vector defined
Created attachment 20979 [details] output spreadsheet with a broken structure
Created attachment 20980 [details] Excel's error message screenshot
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
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.
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
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.