By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,436 Members | 2,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,436 IT Pros & Developers. It's quick & easy.

How to specify a filename when exporting to EXCEL?

P: n/a

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
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,

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.