Downloading Excel spreadsheet in ASP

Results 1 to 4 of 4

Thread: Downloading Excel spreadsheet in ASP

  1. #1
    Join Date
    Dec 1969
    Posts
    247

    Default Downloading Excel spreadsheet in ASP

    I am trying to download an excel spreadsheet from the browser but, when the "Save As" Dialog box pops-up, it already has the name of my ASP page as the filename to Save As. I don&#039t want it like that. Is it possible to set the filename to e.g get_reportid.csv?<BR><BR>This is what i currently have. I have a form with a textbox which accepts ReportIDs. If the user wishes to see the output on the "Web", they click a radio button, if they wish to download it as a spreadsheet, they clic "Download", which is a radio button. The next page which is called get_reportid.asp has an If statement which executes command depending on which radio button was clicked. The problem is, i would like to set the filename to equal get_reportid.csv when "Download" is clicked.

  2. #2
    Join Date
    Dec 1969
    Posts
    73

    Default RE: Downloading Excel spreadsheet in ASP

    I am not Excel expert but you can use excel macro not to popup that Save As window, something like this : <BR><BR>Sub Auto_Close()<BR> ThisWorkbook.Saved = True<BR> ActiveWorkbook.Save<BR>End Sub<BR><BR>I am not sure how to do the save as *.csv though.. :-)<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    131

    Default RE: Not what i want--Downloading Excel spreadsheet in ASP

    I have an ASP file and i need to download output as *.csv file in the browser. E.G if user clicks on radio button, the browser download file and the "Save As" dialog box pops-up to save file as .csv. The "Save As" dialog box is popping up but, it&#039s putting my asp filename (get_reportid.asp) in the "Save As" box. I WANT IT TO PUT SOMETHING LIKE THIS IN THE DIALOG BOX (get_report.csv). PLEASE, PLEASE, PLEASE HELP!!!!!!!!!

  4. #4
    Join Date
    Dec 1969
    Posts
    27

    Default Clarification required

    Could you be more specific ? Where does the data for the report come from. IS it a set of static data or from the database ?<BR>I may be able to help you if you are more specific about your requirement.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •