【发布时间】:2014-08-10 11:45:11
【问题描述】:
我正在尝试读取 xlsx 文件。
我遇到了异常
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. c#
然后我从这里安装它
http://www.microsoft.com/en-us/download/details.aspx?id=13255
然后我将platform target 更改为x64
现在我得到了这个例外:
BadImageFormatException was unhandeled
{"Could not load file or assembly 'LinqToExcel, Version=1.9.0.0, Culture=neutral, PublicKeyToken=9c8ea65a58f03f1f' or one of its dependencies. An attempt was made to load a program with an incorrect format."}
更新 1
我已经安装了 linq_to_excel 使用
Install-Package LinqToExcel
然后将 lib 文件添加到引用中
【问题讨论】:
-
请问答案在哪里?我没有保存链接
-
您安装了哪个版本的 Microsoft Access 数据库引擎?如果你安装的是 x64,我会尝试卸载它并安装 32 位版本。
-
@Mick 是的,使用 32 他治愈了
标签: c# .net linq-to-excel