hi
we are trying to generate xlsx file using LightCelldataprovider.
we are getting some error messages.
Excel found unreadable content in ‘xxx.xlsx’. Do you
want to recover the contents of this workbook? If you trust the source
of this workbook, click Yes.
please find the attached files.
Thanks & Regards
Ranjith.
Hi Ranjith,
hi
we are still facing the issue
Thanks & Regards
Ranjith.
Hi Ranjith,
hi
please find source code and input files.
and we getting this error in case xlsx file opening.
"com.evermind.server.http.HttpIOException: Connection reset by peer: socket write error"
in interntet explorer only.
stack:
com.evermind.server.http.HttpIOException: Connection reset by peer: socket write error
at com.evermind.server.http.EvermindServletOutputStream.flush(EvermindServletOutputStream.java:286)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:410)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
at java.io.BufferedWriter.flush(BufferedWriter.java:230)
at org.dom4j.io.XMLWriter.flush(XMLWriter.java:272)
at com.aspose.cells.er.a(Unknown Source)
at com.aspose.cells.er.a(Unknown Source)
at com.aspose.cells.hu.s(Unknown Source)
at com.aspose.cells.hu.a(Unknown Source)
at com.aspose.cells.kH.a(Unknown Source)
at com.aspose.cells.iD.b(Unknown Source)
at com.aspose.cells.iD.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at _eisrs._jsp._reporting._EiSRSGenerateExcelJsp.CreateExcel(EiSRSGenerateExcelJsp.jsp:92)
at _eisrs._jsp._reporting._EiSRSGenerateExcelJsp._jspService(EiSRSGenerateExcelJsp.jsp:15)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:139)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
Thanks & regards
Ranjith
Hi Ranjith,
hi
we found solution.
problem is with the stream.
stream will be closed abnormally.
so it gives unreadable content. to fix this we set the
“response.setHeader(“Content-Length”, “”+file.length());”
this one working fine in case of file downloading.
if the file is generated in heap at that time “stream will be closed abnormally”.
so we must set “content-length” before generating the file.
there is post in your forums.
in that you fixed the same issue. in that case file is saved to disk.
``
please update your webdemo examples.
Thanks & Regards
Ranjith.
Hi,
Hi,
We did found similar error of the reset or closed output stream when saving workbook in jsp by testing your jsp file.
But we do not think this is the issue of our component because such kind of issue occurs for saving any data to the output stream of web response even without any reference to cells component. And the same logic will work fine when use servlet instead of jsp.
So we think it is the issue of processing response and sending data to output stream in jsp. As you have found and tested, set proper “Content-Length” property to the response may be a solution for such kind of issue.