GridView exported to Excel can't be read using OleDb

M

mohaaron

I am finding that when a GridView is export to Excel by changing the
ContentType of the page the Excel file is not readable by OleDb or SQL
Server DTS. I also tried using a Excel Reader that I found (http://
www.codeproject.com/csharp/Excel_DataReader.asp) but this also threw
an error trying to read the header. I believe that this is all
happening because the exported Excel file is in some sort of html
table format. Does anyone know anything about this and how I might
solve this problem?

If I create a blank Excel file from scratch and then write in some
header and values the file can be read, just not the exported file.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top