hi,
I have used SXSSF to create the excel with 2 sheets in it. For excel with 1
sheet, it opens up properly without any problem. But with two sheets & with
large data (45k+ rows & 100+ columns) i get the following pop up while
opening the excel : "Excel found unreadable content in 'doc1.xlsx'.Do you
want to recover the contents of this workbook? if you trust the source of
this workbook,click Yes."
if i click yes, the data is present in the sheets but all the styles
applied to the workbook is lost.
SXSSFWorkbook workbook = new SXSSFWorkbook(DEFAULT_WINDOW_SIZE);
buildExcelDocument(model, workbook, request, response);
response.setContentType(getContentType());
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
protected void buildExcelDocument(Map<String, Object> model,
SXSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse
response) throws Exception {
String excelSheetName = CommonUtil.getExcelNameForXssf(entityType,
entityName, Date); response.reset();
response.setHeader("Content-Disposition", excelSheetName);
createSheet1(model, workbook);
createSheet2(model, workbook);
response.flushBuffer();
}
Please help me to resolve this issue.
Regards, Shreya
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/problem-opening-excel-2007-created-using-SXSSF-tp4705691p4705691.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]