https://issues.apache.org/bugzilla/show_bug.cgi?id=51158

--- Comment #3 from Michael L. <[email protected]> 2011-12-20 16:49:34 UTC ---
While generating an example for Bug #52349, I believe I stumbled upon this bug
(albeit without having to explicitly call "write").  I'm re-posting that
example here with details on the "new" issue I ran into:


Attached "test.java" simply walks through a given spreadsheet, outputs the
contents (formulas/cached values/FormulaEvaluator results/etc.), and closes the
workbook.  For some spreadsheets this works fine...however with others (and
specifically with the simple example spreadsheet I'm attaching - test.xlsx),
the method runs fine the first time but on subsequent calls it fails with an
InvocationTargetException:


Caused by: java.io.IOException: error: Unexpected end of file after null
    at
org.apache.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:125)
    at
org.apache.poi.xssf.model.SharedStringsTable.<init>(SharedStringsTable.java:102)
    ... 9 more


And then if you open the file in Excel, you'll get an "unreadable content"
error with this response if you allow Excel to repair the file:  "Removed Part:
/xl/sharedStrings.xml part with XML error.  (Strings) A document must contain
exactly one root element. Line 1, column 0."

Confirmed under java versions "1.6.0_24" and "1.7.0" using poi-3.8-beta4.

-- 
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]

Reply via email to