クライアント側でダウンロード用の Excel ファイルを生成できません。これは私が持っているコードです:
<%
try{
//Getting HSSFWorbook object from controller
HSSFWorkbook wb= (HSSFWorkbook)pageContext.findAttribute("wb");
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content- Disposition","attachment;
filename=ESTHotelPerfByMonthExcelReport.xls"
);
//Writing to output Stream
ServletOutputStream outputStream = response.getOutputStream();
wb.write(outputStream);
outputStream.flush();
}//closing try
catch (IOException ioe) {
}
}//closing if
//The above code is not generating any
// excel sheet however if i write the output to
// a excel file it shows the all the data
%>