简体   繁体   English

“ Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机上注册。 C#

[英]The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. c#

I am trying to use linq_to_excel 我试图用linq_to_excel

http://www.softinterface.com/DL/DL_UserData_Proc.ASP http://www.softinterface.com/DL/DL_UserData_Proc.ASP

This is my code: 这是我的代码:

var data = new LinqToExcel.ExcelQueryFactory();
            data.FileName= @"FRM_DTA.xlsx";
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_ID, "FRM_ID");
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_OWNER, "FRM_OWNER");
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_AREA_ID, "FRM_AREA_ID");
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_EMARA_ID, "FRM_EMARA_ID");
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_REGION_ID, "FRM_REGION_ID");
            data.AddMapping<ExcelFileDefinition>(x => x.FARM_NUMBER, "farmNumber");
            data.AddMapping<ExcelFileDefinition>(x => x.RECEIVING_CENTER_ID, "RecievingCentreID");
            var result = from x in data.Worksheet<ExcelFileDefinition>()
                         select x;
            (foreach(var row in result){
                Console.WriteLine(row.FARM_ID);
            }

when I run it, I got this exception: 当我运行它时,出现了以下异常:

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

Help please 请帮助

What I have tried 我尝试过的

I found this question Microsoft.ACE.OLEDB.12.0 provider is not registered and I changed my platform target from any cpu to x86 but still have the problem 我发现这个问题Microsoft.ACE.OLEDB.12.0供应商没有注册 ,我改变了我的platform targetany cpux86 ,但仍然有问题

我需要下载Office 2007系统驱动程序:数据连接组件版本: https//www.microsoft.com/zh-cn/download/confirmation.aspx?id = 23734

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机上注册。 - The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. ''Microsoft.ACE.OLEDB.12.0' 提供程序未在本地计算机上注册。' - 'The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.' “未在本地计算机上注册&#39;Microsoft.ACE.oledb.12.0&#39;提供程序的在线错误。” - online error of “The 'Microsoft.ACE.oledb.12.0' provider is not registered on the local machine.” System.InvalidOperationException:&#39;Microsoft.ACE.OLEDB.12.0&#39; 提供程序未在本地计算机上注册。&#39; - System.InvalidOperationException: 'The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.' 一些有关“ Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机上注册的问题。 - Some issue about “The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.” “ Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机上注册。 错误 - The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Error Microsoft.ACE.OLEDB.12.0&#39;提供程序未在C#应用程序的本地计算机上注册错误 - Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error in C# application 未在本地计算机上注册“ Provider = Microsoft.ACE.OLEDB.12.0”提供程序 - The 'Provider=Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine microsoft.ace.oledb.12.0提供程序未在本地计算机上注册 - the microsoft.ace.oledb.12.0 provider is not registered on the local machine “&#39;Microsoft.ACE.OLEDB.12.0&#39; 提供程序未在本地计算机上注册” - "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM