Does the excel file get parsed correctly without the HTTP Transmission?
I'm not sure you need to the safe stream anymore, the heavy lifters (thanks guys!) patched it to accept slow streams.
http://issues.apache.org/bugzilla/show_bug.cgi?id=13478
Can you also provide a more detailed stack trace so we can guess a little better?
Bruce Houghton wrote:
To all;
I get ExceptionInInitializerError at HSSFWorkbook.
I'm using poi...20040804.jar, and JRE1.4.2_04.
The URL generated "HTTP://www....../.../barry/images/excel.xls"
is correct. Printing the header field shows "HTTP 1.1 200 ok",
more messages, then "application/msexcel", date twice
then the length of the file. Everything I read points to
a compatibility issue.
Any thoughts.
Bruce Houghton
HSSFWorkbook Read1() throws IOException { URL url = new URL(codeBase, "barry/Images/Excel.xls"); URLConnection uc = url.openConnection(); String field = uc.getHeaderField(0); for (int i=0;field != null; i++) { JOptionPane.showMessageDialog(null, field); field = uc.getHeaderField(i); } SafePOIStream is = new SafePOIStream(uc.getInputStream()); HSSFWorkbook wb = new HSSFWorkbook(is); return wb; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
