How C# read Excel 4.0 with MS SQL?
I tried below code... it's doesn't work as well... any got solution for this? Thanks.
using (OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + fileName + "\";Extended Properties=Excel 8.0;"))
denniskhor
Junior Poster in Training
72 posts since Oct 2007
Reputation Points: 6
Solved Threads: 0
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
I don't think I have anything to add to this thread regarding Excel. Adatapost already linked to all of my knowledge for the product :P
>>I tried below code... it's doesn't work as well... any got solution for this? Thanks.
What do you mean by "doesnt work well"? Is it slow or throwing an exception?
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
I don't think I have anything to add to this thread regarding Excel. Adatapost already linked to all of my knowledge for the product :P
>>I tried below code... it's doesn't work as well... any got solution for this? Thanks.
What do you mean by "doesnt work well"? Is it slow or throwing an exception?
Ya, its throw an exception which state:
{"External table is not in the expected format."}
denniskhor
Junior Poster in Training
72 posts since Oct 2007
Reputation Points: 6
Solved Threads: 0
Can you upload the Excel file in question? Click "Go Advanced" then "Manage Attachments" and upload a .ZIP file containing the spreadsheet.
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
Ya, its throw an exception which state:
{"External table is not in the expected format."}
I dunno use that ODBCconnection string method.. who can teach me?
denniskhor
Junior Poster in Training
72 posts since Oct 2007
Reputation Points: 6
Solved Threads: 0