locked
Export Data to Excel from Web Site Data Table RRS feed

  • Question

  • User2023521679 posted

    I was using ContentType="application/vnd.ms-excel" on my web site to display a datatable in an excel workbook on the client. It worked great. Now that I have upgraded to Office 2007 and vb.net 2010, I get a warning saying that the file is in a different format than specified by the file extension (.xls). I googled new ways of exporting data to excel, but have yet to find a good example. I used Microsoft.Office.Interop.Excel which worked great, except I read that you are not supposed to use this on a web server.

    So what is the best recommended method for exporting to excel and where can I find a relative simple vb example on how to do this?

    Wednesday, May 9, 2012 4:15 PM

Answers