Excel..program saves..

Results 1 to 4 of 4

Thread: Excel..program saves..

  1. #1
    Lynn Maharet Guest

    Default Excel..program saves..

    Hi all..<BR><BR>I have tried certains examples that export to excel..<BR>but it requires the user to save the document himself..<BR>what i want to do is let the program do the saving itself..<BR>what is the diff btw CSV and Native Excel..?<BR><BR>Can I let the program do the saving of either a CSV or Native Excel file? Pls advise... thanks very much...<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Excel..program saves..

    You can NOT write a file to the user&#039s local system, with out them explicitly &#039OK&#039ing it. That is the nature of client/server security. <BR><BR>the easiest way I&#039ve found to export to Excel is to use the <BR>Response.ContentType = "application/vnd.ms-excel" <BR>and go on with your regular page. It sometime (usually) takes some format tweaking, but generally works very well. <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Excel..program saves..

    Exactly how are you trying to export to excel?! Can you show me some code?!

  4. #4
    Franco Guest

    Default RE: Excel..program saves..

    I think there are 2 issues here:<BR><BR>When you&#039re exporting files from your web page, its usually sitting on your web server. You can link to it and that link will allow the user to download or open the file from the web server. <BR>That&#039s preferable to actually naming a specific location on the user&#039s machine because either you have to choose something very general (C:) or something specific and risk the user not having that particular folder on their PC throughout the life of that ASP page. Its a pain to keep going back and changing the "where-to-download" address every time your user moves to a new PC or wants to rename or change their directory structure.<BR><BR>If you do use a general address, then the user will end up having to move the file themselves somewhere else. They might as well save it from the web server to a particular location.<BR><BR>Native Excel vs CSV: <BR><BR>CSV (comma separated variables) files are ones where the data is separated by commas. Eg "John","21/09/76",41<BR>CSVs are better for three reasons.<BR><BR>1. CSVs can be opened in Word (for data checking), Excel and Access;<BR>2. CSV files are much smaller than Excel files (your web server administrator will esp. appreciate this point); and<BR>3. CSV files are guaranteed to work with all versions of Excel, <BR>Access, Word etc.<BR><BR>Good luck.<BR><BR>F.

Posting Permissions

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