how to output a comma delimited file

Results 1 to 2 of 2

Thread: how to output a comma delimited file

  1. #1
    Simon Lee Guest

    Default how to output a comma delimited file

    I have written a set of ASP pages to let a user view the results of a query. As the recordset can be quite big the user can view it in pages. Another option I want to offer to the users is the option to download a comma delimited file for use in Excel. I created a link to an ASP page that creates the CDF on the fly by using Response.Write(). By changing the HTTP header content type to text/plain, the browser brings up the save dialog box, and so the output from the ASP script can be written straight into a file. The problem is is that the save dialog box uses the file name of the ASP page and has a file type of ASP. Is there any way to change this to .txt or set the file name? Maybe there is a way to write the file on the fly and download it directly as a .txt file (without writing a file on the server)?

  2. #2
    Join Date
    Dec 1969

    Default yes/no

    Well<BR><BR>sure,<BR><BR>use the File System Object to build the comma delimited file,<BR>and then allow your users to download the text file you created.<BR><BR>That is probably the path of least resistance for you.

Posting Permissions

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