mike888
mike888

Reputation: 33

Reading an excel file : connection error from c#?

My program needs to read some data in an Excel file.

My configuration :

Windows 10 x64 / Visual Studio 2019 / Office 2019 x64

And I've some trouble with this code :

string connectionString1 = @"Provider=Microsoft.ACE.OLEDB.15.0;Data Source=" + filePath22 + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";";

The connection string seems to be incorrect seen that I receive an error message :

"The 'Microsoft.ACE.OLEDB.15.0' provider is not registered on the local machine."

I've already tried to install the "Microsoft Access database engine 2010 x64" and the "Microsoft Access database engine 2016 x64" but the problem continues...

Thanks for your help ! ;)

Upvotes: 1

Views: 208

Answers (1)

James m
James m

Reputation: 166

I found this forum post that suggests installing the Microsoft access 2013 runtime.

Forum link: https://answers.microsoft.com/en-us/msoffice/forum/all/the-microsoftaceoledb150-provider-is-not/6430a47d-263c-43af-aabc-f134da4b830e

Runtime link: https://microsoft.com/en-us/download/details.aspx?id=39358

Upvotes: 1

Related Questions