You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pr...@Eaton.com on 2013/06/25 06:48:08 UTC

Save as dialog box for POI

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