Problems while creating HSSFWorkbook with an InputStream

"Ceron, Jay" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
Hello,

I'm reading in an Excel file using Oreilley's MultipartParser class from my
servlet's HttpServletRequest.  When I get the file name, size and other
information about the file from the MultipartParser, everything is dandy.
But, when I get the InputStream and pass it on to the HSSFWorkbook object, I
get a "file not found" exception.

I even tried creating the workbook as follows:

POIFSFileSystem fs = new POIFSFileSystem(inStream);
HSSFWorkbook workbook = new HSSFWorkbook(fs);

but I get the same error.  I can create the workbook if I pass the file name
and path to the POIFSFileSystem constuctor.  I have noticed that if the
Excel workbook is not saved as Microsoft Excel 97-2000 & 5.0/95 Workbook
(*.xls), even when passing the file name, I get the "file not found"
exception.

Can anyone help?

Thanks

Jay

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.