Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    30

    Unanswered: Export to Excel (and compress -> ZIP)

    I have succesfully create export from my database to Excel file using
    Response.ContentType = "application/vnd.ms-excel"
    command.

    It's kinda interesting, but I have three questions more which I don't know how to realize.

    1. Is it possible instead of xls, export as compressed .zip file?
    2. Is it possible to Freeze first row, freeze option in Excel stay "always on"?

    3. How to add some special code which I would write in Excel?

    Thanks.

  2. #2
    Join Date
    Apr 2004
    Posts
    1

    export explanation

    may you be so kind to explain the exact steps to export a database to excel? thanks

  3. #3
    Join Date
    Jan 2004
    Posts
    30
    Just create standard table and all records in this table you want to show.

    And add this in the begginig of the page:

    Response.ContentType = "application/vnd.ms-excel"
    Response.AddHeader "content-disposition", "attachment; filename=filename.xls"


    That's all.

  4. #4
    Join Date
    Dec 2003
    Posts
    454

    Re: Export to Excel (and compress -> ZIP)

    Originally posted by dove_g
    2. Is it possible to Freeze first row, freeze option in Excel stay "always on"?
    If you export the data from the database to excel file, you can control to keep or remove the first row.

  5. #5
    Join Date
    Jan 2004
    Posts
    30
    How to do that, I'm generating table in ASP code from MS Access database using above mentioned commands.

    All I want is to freeze first row and somehow compress excel file in the fly (.zip).
    Uncompressed .xls file has 300 kB and compressed zip only 20 kB, so this will be very good option for my web page.

    Thank 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
  •