I want to load xls and xlsx file in c#.
For xls I'm using: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=
I can upload xlsx file without problem but when I upload xls file I got the following error:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."
And if I change the Platform Target to x86 then xls file is uploaded without problem but
this time xlsx file is giving this error:
"The 'Microsoft.Ace.OLEDB.12.0' provider is not registered on the local machine."
How can I upload but file formats without error?
Thanks
Constance SwintonPosted Jun 4, 2014, 4:48 AM
http://social.msdn.microsoft.com/Forums/vstudio/en-US/cfb9efe8-4de2-40b6-b817-553c91b9f9c6/the-microsoftjetoledb40-provider-is-not-registered-on-the-local-machine
Also an alternative which you could try is this .NET component for excel file manipulations.
Manipulations which you can achieve include the reading of excel files (both XLS and XLSX) with C# code in the same manner, like the following:
var xlsxFile = ExcelFile.Load("Book1.xlsx");
Posted Dec 17, 2013, 4:08 AM
Deepak VermaPosted Sep 7, 2012, 3:24 AM
You need to download AccessDatabaseEngine. Choose the appropriate download for you ...
Office 2007 : Download
Office 2010 : Download