C # When importing an Excel file, the following error occurs: the 'Microsoft. Ace. oledb.12.0 'provider is not registered on the local mach.

Source: Internet
Author: User

 

Asp.net is released to IIS. When you import an Excel file, the title is incorrect. I have found many methods on the Internet and have not solved the problem. Now the problem has been solved. In this summary, if you encounter the same problem, it is convenient to refer ~

 

Solution 1: Download accessdatabaseengine (http://www.microsoft.com/zh-cn/download/details.aspx? Id = 23734)

Supported Operating Systems

Windows Server 2003 Service Pack 1, Windows Vista, Windows XP Service Pack 2

 

Solution 2: Download accessdatabaseengine (http://www.microsoft.com/zh-cn/download/details.aspx? Id = 13255) (This compatibility mentioned above is listed here ~)

Supported Operating Systems

Windows 7, Windows Server 2003, Windows Server 2003 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 1, windows XP Service Pack 2

Only 32-bit Access database engine can be used on Windows XP Service Pack 3.

 

Use this download: (refer to MicrosoftDownload Center)
1. If you are an applicationProgramFor more information about how to use the driver, see the application documentation.
2. If you are an application developer using oledb, set the provider parameter of the connectionstring attribute to "Microsoft. Ace. oledb.12.0"
To connect to Microsoft Office Excel Data, add "Excel 14.0" to the extended properties of the oledb connection string.
3. if you are an application developer who uses ODBC to connect to Microsoft Office access data, set the connection string to "driver = {Microsoft Access Driver (*. mdb ,*. accdb)}; DBQ = path to MDB/accdb file"
4. if you are an application developer who uses ODBC to connect to Microsoft Office Excel Data, set the connection string to "driver = {Microsoft Excel Driver (*. xls ,*. XLSX ,*. xlsm ,*. xlsb)}; DBQ = path to XLS/XLSX/xlsm/xlsb File

 

FYI

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.