424,294 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,294 IT Pros & Developers. It's quick & easy.

How to specify a filename when exporting to EXCEL?

P: n/a
Hi,

I have a servlet that generates a report and exports it as XLS. When I
open it in Internet Explorer I get the XLS report but the problem is
that instead of the name I have set to the report I get the name of the
servlet.
For setting the name I use: response.setHeader("Content-Disposition",
"inline; report.xls");

When I want to save the file, the file name is not report.xls as
expected, but ReportGenerator.xls(the name of the servlet that
generates the report)

Even more if I use: response.setHeader("Content-Disposition",
"attachment; report.xls");

everything works as expected.

Anyone any clues?

Thank you,
Florin

Nov 27 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.