Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2006, 04:52 PM
Registered User
Join Date: Mar 2006
Location: , MI, .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export to Excel as .csv file from JSP

I'm trying to export my results to .csv file. The following is the code which I have in my .jsp:

//Send the results to Excel.
response.setHeader("Content-Disposition", "attachment; filename=Excel.csv");

There are 2 problems which I'm facing:
1. The File Download box comes up and when I save file, the results are have all the html tags when I open it in excel.
2. if I open the file, the download box comes up twice, and again it has all the html tags when it opens.


thanks in advance!

Reply With Quote
  #2 (permalink)  
Old April 5th, 2006, 09:12 AM
Registered User
Join Date: Mar 2006
Location: , MI, .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts


Reply With Quote
  #3 (permalink)  
Old May 10th, 2006, 10:31 AM
Registered User
Join Date: May 2006
Location: Buftea, Ilfov, Romania.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to fuzzy

Try it like this:
Instead of Export.csv you can put your desired filename.

PS: don't be so inpacient when you ask someone to help you FOR FREE. All the help in here can be considered [u]DONATION</u>, so try to behave if you want to get it from now one.

I like money, but I'm not crazy about them. Seems the feeling is mutual.
Reply With Quote
  #4 (permalink)  
Old November 30th, 2006, 08:04 AM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gourav_ajmani

HI Fuzzy ,I have tried what u said to do..That is to add the two lines in JSP..But the problem is when I click on the link which should open Excel sheet .it ask me to save or open the excel file.when i do so it prints the whole jsp page in Excel.

Plz help me on the same

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet export to .csv file snufse1 ASP.NET 2.0 Basics 3 September 22nd, 2008 07:22 AM
Export ALL records from GridView into Excel or CSV kevorkian ASP.NET 2.0 Basics 7 June 17th, 2008 01:28 PM
How to export an image file to excel using jsp sujasuri Other Programming Languages 0 November 15th, 2007 06:16 AM
How To Export a specific Excel Sheet as a csv file mrjits Excel VBA 5 August 1st, 2006 03:04 PM
Export To .csv File paul31Hampshire Access VBA 18 June 26th, 2006 11:30 AM

All times are GMT -4. The time now is 12:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.