Creating a CSV file from ASP

Results 1 to 3 of 3

Thread: Creating a CSV file from ASP

  1. #1
    Zork Guest

    Default Creating a CSV file from ASP

    Hello all...<BR><BR>I know this topic has been discussed in detail on this<BR>messageboard before. I am trying to query a database and<BR>return the results in CSV format.<BR><BR>I have been able to use FSO to write the file on the server<BR>and then provide the user a link to that file. If possible I<BR>would like to use another solution.<BR><BR>Just to give you a little background, the web server that<BR>I am using does not have Excel (so I can&#039;t use a ContentType<BR>of "application/").<BR><BR>I am trying to write the comma-delimited data to the browser<BR>(via ContentType="text/csv" and Response.Write) and spawn the<BR>user&#039;s Excel application to view the data. I can write the<BR>data just fine. It even prompts me to open/save the data.<BR>The problem is that it tries to save the data as an ASP page<BR>(e.g. results.asp). Given that, when I select to open the<BR>file, it kicks the data out to Visual Interdev.<BR><BR>Is there a way to change it so that the browser thinks it<BR>is opening a CSV file instead of an ASP file? If at all<BR>possible, I would rather not write a temp file to the<BR>server.<BR><BR>I have a feeling I will have to settle with writing the file,<BR>but I want to make sure no other alternatives exist before <BR>doing so.<BR><BR>Thanks,<BR><BR>Cory Zorker<BR>(aka Zork)<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Creating a CSV file from ASP

    &#062;the web server that <BR>I am using does not have Excel (so I can&#039;t use a ContentType <BR>of "application/"). <BR>Does the web server have to have excel installed to use this? I thought just the client had to have it installed? Hmmm..<BR>

  3. #3
    Zork Guest

    Default RE: Creating a CSV file from ASP

    Sorry about that! You are right. I don&#039;t know what<BR>made me think that application/ required<BR>Excel to be on the web server.<BR><BR>Everything works fine.<BR><BR>Thanks :)<BR><BR>-Zork

Posting Permissions

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