Hi,

I am working on a project where I am using POI. I am able to generate the excel 
sheet. I just need a save as dialog to ask the user to specify the path.

I am using JSP Servlets and the piece of code I got is as follows:

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\"TMS.xls\"");
ServletOutputStream out = response.getOutputStream();
workbook.write(out);
out.flush();
out.close();

It's not working for me. Can anybody please help me out? Thanks.

Regards,
Pratik Lahoti

Reply via email to