hi
i am using the following code to download xlsx file.
<%
String resultXLS="EIS Modules Installed_1008404_4.xlsx";
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8");
response.setHeader("content-disposition", "inline; filename=\"" + resultXLS + "\"");
File file = new File("/ed2/ora510/eld10comn/html/eisrs/EIS Modules Installed_1008404_4.xlsx");
FileInputStream fileIn = new FileInputStream(file);
OutputStream outExcel = response.getOutputStream();
byte[] outputByte = new byte[8192];
//copy binary contect to output stream
while(fileIn.read(outputByte, 0, 8192) != -1)
{
outExcel.write(outputByte, 0, 8192);
}
fileIn.close();
outExcel.flush();
outExcel.close();
%>
when i click open in IE. the xlsx file name will change to
jsp page name.
this will work fine in mozilla and chorme.
Thanks & Regards
Ranjith.