poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57161] New: Add a warning against opening Excel file with WorkbookFactory.create(File)
Date Wed, 29 Oct 2014 08:59:54 GMT

            Bug ID: 57161
           Summary: Add a warning against opening Excel file with
           Product: POI
           Version: 3.11-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: PhiLho@GMX.net

I wrote code opening an Excel file (XLS or XLSX) with an InputStream. I modify
the file, then I save it back. Worked well.
Re-reading the doc, I see that WorkbookFactory.create(File) uses less
resources, so I used this method instead.
All my tests failed. I got, for XLSX, a message "Can't obtain the input stream
from /docProps/app.xml", and for XLS, a message about an index out of bounds.

After investigation, I found I was not alone:

So I just reverted to read my file from an input stream (it isn't big anyway).

I can understand it can be a limitation of the underlying system (Windows 7
But I suggest you put a warning against this kind of usage, when you recommend
to use this form of opening.
If you have a fix, or at least a way to make a friendlier error message, it
would be even better...

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message