Opening an Excel distribution sheet in .NET on x64

I cannot open an Excel distribution sheet with .NET on an x64 server using the following connection string

"Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + filePath + "; Advanced Properties = Excel 8.0;"

I get that the provider "Microsoft.Jet.OLEDB.4.0" is not registered on the local computer.

I installed the 2007 Office system component: data connection components and tried using Microsoft.ACE.OLEDB.12.0 and this connection string

"Provider = Microsoft.ACE.OLEDB.12.0; Data Source =" + filePath + "; Advanced Properties = Excel 8.0;"

and got "Microsoft.ACE.OLEDB.12.0 Provider" is not registered on the local computer. "

I searched Google with the only answer being a 64-bit problem, who has an idea how to fix this?

+3
source share
2 answers

The OleDB Excel 2003/2007 drivers are only 32-bit. I understand that you can only use them in a 32-bit application.

SpreadsheetGear for .NET will open xls and xlsx workbooks, and it is tested and supported on both 64-bit and 32-bit .NET 2.0+.

You can download the rating here and see live ASP.NET samples (C # and VB) here .

Disclaimer: I have SpreadsheetGear LLC

+2
source

32- . , AnyCPU x86 Visual Studio.

, , corflags.exe. , Authenticode, . Visual Studio:

corflags.exe <path and exe file name> /32BIT+
+3

Source: https://habr.com/ru/post/1711591/


All Articles