473,625 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to specify a filename when exporting to EXCEL?

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.setHea der("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.setHea der("Content-Disposition",
"attachment ; report.xls");

everything works as expected.

Anyone any clues?

Thank you,
Florin

Nov 27 '05 #1
0 953

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3057
by: deko | last post by:
I use a complied query to export to Excel like this: SELECT * INTO . FROM tblExcelData; But I have a situation where I need to export several tables into the same worksheet. The idea is to have each contiguous block of data on the worksheet separated by 50 or so rows so a graph can be inserted between each set of data.
3
270
by: zweng | last post by:
I checked a few sites on exporting data from asp.net to excel and most of them point to the same source a http://support.microsoft.com/default.aspx?scid=kb;EN-US;317719 with some modifications My code is in the block below. When I click save when the open/save message box pops up, the file is saved as the aspx page's name with .xls. However, when I open the file, the filename is the exact aspx page name with .aspx in MS Excel ...
3
2513
by: zweng | last post by:
I checked a few sites on exporting data from asp.net to excel and most of them point to the same source a http://support.microsoft.com/default.aspx?scid=kb;EN-US;317719 with some modifications My code is in the block below. When I click save when the open/save message box pops up, the file is saved as the aspx page's name with .xls. However, when I open the file, the filename is the exact aspx page name with .aspx in MS Excel ...
6
423
by: zweng | last post by:
I checked a few sites on exporting data from asp.net to excel and most of them point to the same source a http://support.microsoft.com/default.aspx?scid=kb;EN-US;317719 with some modifications My code is in the block below. When I click save when the open/save message box pops up, the file is saved as the aspx page's name with .xls. However, when I open the file, the filename is the exact aspx page name with .aspx in MS Excel ...
1
2306
by: ad | last post by:
I use the code below to export the content of a data set to Excel, the code come form http://www.dotnetjohn.com/articles.aspx?articleid=36 But it always use the web form's name as the default name of excel. Can we specify a meaningful filename before exporting to EXCEL? ------------------------------------------------------------------------------------------- 'first let's clean up the response.object response.Clear()
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.