Hi,
Iam not able to write workbook in jsp page as
HSSFWorkBook.write(outputstream) is not taking JspWriter object out as
parameter.
Here is my code snippet.
String reportName=request.getParameter("reportName");
String dataKey=request.getParameter("dataKey");
// Get the data to download
//String[] results = (String[]) session.getAttribute(dataKey);
HSSFWorkbook wb =
(HSSFWorkbook)session.getAttribute(dataKey);
//Re-gain memory
session.removeAttribute(dataKey);
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;
filename="+reportName+".xls");
OutputStream outs = response.getOutputStream();
wb.write(outs);
Iam getting the below error.
getOutputStream() has already been called for this response
If I use jsp implicit object out, then my jsp is not compiled and saying
duplicate local variable out
Is there any way to get rid of this problem.
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Writing-a-workbook-in-jsp-page-tp3403927p3403927.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]