table to excel by pressing button

Results 1 to 3 of 3

Thread: table to excel by pressing button

  1. #1
    Join Date
    Dec 1969

    Default table to excel by pressing button

    Hi all,<BR><BR>I got a table on my asp page that i want to convert to excel by pressing a button,<BR>this button is also located on the same asp page.<BR>However the table contains around 20 columns and around 200 rows.<BR>Can this be done??<BR>If yes, can you supply me with an example??<BR><BR>Your help will be appreciated.<BR><BR>Thanks, Renzo.

  2. #2
    Join Date
    Dec 1969

    Default RE: table to excel by pressing button

    hi, reading from or writing to excel file, from ASP is possible. But I don&#039;t know where you can get the exact source for that one. <BR><BR>Try

  3. #3
    Join Date
    Dec 1969

    Default .CSV trick

    Here&#039;s a slick trick that may work for you. It&#039;s easier than creating an excel file. You don&#039;t get fancy formatting or stuff like formula&#039;s in cells, but you do get your data in excel.<BR><BR>Basically you change the content type to .csv and Response.write your recordset in csv form. This will pop up a save as/open dialog and if you open it&#039;ll go straign to excel.<BR><BR>Change the content type w/ the following lines:<BR><BR>Response.AddHeader "Content-Disposition", "inline;filename=SomeFile.csv"<BR>Response.Content Type = "text/CSV"

Posting Permissions

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