Export data to Excel (Not HTML Tables)

Last post 02-14-2007 7:46 AM by KarlR. 2 replies.

Sort Posts:

  • Export data to Excel (Not HTML Tables)

    01-09-2007, 1:02 PM
    • Loading...
    • phokus
    • Joined on 01-09-2007, 5:51 PM
    • Posts 1

    I have been searching for a way to do this but to no avail. I need to export a GridView to an Excel spreadsheet in the actual XLS format. Not HTML tables saved to a file with XLS extension. The reason being, I need to reimport the data using the OleDbConnection (so I can query it and such) and it does not like the HTML table code. I tried to use the OldDbConnection to Create Tables but that did not work, I even tried just inserting records but could not get that to work either.

    It almost shocks me that there is not an easier way to do this. I work for a corporation, and they will not buy any of the DLL solutions, nor would they install them on their servers for security and other reasons.

    Can anyone help?

    Thanks in advance,

    Louis 

     

    Filed under: , , ,
  • Re: Export data to Excel (Not HTML Tables)

    02-14-2007, 7:31 AM
    • Loading...
    • KarlR
    • Joined on 02-02-2007, 10:07 AM
    • Sarasota, FL, USA
    • Posts 139

    Louis,

    I am looking for exactly the same thing (for different reasons).  Did you ever find a solution to your Excel/HTML problem above?  If so, I would appreciate if you could post it here.

    Thanks!

  • Re: Export data to Excel (Not HTML Tables)

    02-14-2007, 7:46 AM
    • Loading...
    • KarlR
    • Joined on 02-02-2007, 10:07 AM
    • Sarasota, FL, USA
    • Posts 139

    Whups, never mind.  I found the solution here.

    As is mentions, you just have to change the HtmlEncode property of the columns to False.

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter