what version of hssf are you using?

Nandan Kidambi wrote:
Scenario:
Iam trying to read and write an excel sheet from a server to a client. I have to read the excel from a DBserver & workflow server (which is not the same from tomcat server and has a firewall between them.) So making a http conn from servlet engine server. I know that in the url Iam getting a valid excel file ( coz from the server where it was written to by another process I can open it).


Reading a stream from Http (via a httpurlconnection.getinputstream()). This iam writing to the response : like below..

response.setContentType("application/vnd.ms-excel");
InputStream in= httpurlconnection.getInputStream();
POIFSFileSystem fs= new POIFSFileSystem(in);
HSSFWorkbook wb = new HSSFWorkbook();
OutputStream out = response.getOutputStream();
wb.write(out);
out.close();

When I execute, Iam getting the below error.. Could someone please help ?? This is stopping our dev for the customer. What am I doing wrong or should do differently?

java.io.IOException: Invalid header signature; read 8387989908914269500,
expected -2226271756974174256
at org.apache.poi.poifs.storage.HeaderBlockReader(HeaderBlockReader.java :124)
at org.apache.poi.poifs.filesystem.POIFSFileSystem(POIFSFileSystem.java:120)




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to