DaJim
DaJim

Reputation: 23

Read excel file with c# in 64-bit pc with Office 2003

I have a desktop application which has to read an excel file (either .xls or .xlsx).

When the application is installed in a Windows 7 pc with Office 2003 i cant read the excel file using Microsoft.ACE.OLEDB.12.0. I have the message that Microsoft.ACE.OLEDB.12.0 is not registered. Using Microsoft.JET.OLEDB.4.0. doesnt help either.

So how can we read the excel file? I know one option is to build my application forcing it to compile to (x86) so it runs as a 32-bit application. Ok, supposing i dont want to do so, is there any other option? Thanks for any answers. Any comments are welcome!

Upvotes: 2

Views: 1906

Answers (2)

trailmax
trailmax

Reputation: 35106

Sounds like a job for Npoi. Stand alone library that can work with xls and xlsx files. No need to use those Jet libraries. Ok, that will involve a bit of work, but you remove a dependency from something you can't control on user's machine.

Upvotes: 0

PhonicUK
PhonicUK

Reputation: 13844

You need the 64-bit JET/ACE driver installed:

http://www.microsoft.com/en-us/download/details.aspx?id=13255

Upvotes: 1

Related Questions