Last post Apr 12, 2017 05:44 AM by danishdotnet
Apr 11, 2017 12:01 PM|danishdotnet|LINK
I am trying to copy data from excel sheet to sql server using sql bulk copy all logic working fine on IIS Express. But whenever I have hosted it on IIS and ran it throws this error "Microsoft.ACE.OLEDB.12.0' provider is not registered on the local
machine". So please help to resolve this without setting in Application pool
"Enable 32-Bit Application = true" because I don't want to set it true. I have used MS Office 32-Bit, It have to uninstall or any solution with it. Get error on "excel_con.Open()"
'Upload and save the file
Dim excelPath As String = Server.MapPath("~/Files/") + Path.GetFileName(FileUpload1.PostedFile.FileName)
Dim connString As String = String.Empty
Dim extension As String = Path.GetExtension(FileUpload1.PostedFile.FileName)
Select Case extension
connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & excelPath & ";Extended Properties=""Excel 8.0;HDR=YES;IMEX=1"""
'Excel 07 or higher
connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & excelPath & ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1"""
Using excel_con As New OleDbConnection(connString)
Dim sheet1 As String = excel_con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing).Rows(0)("TABLE_NAME").ToString()
Dim dtExcelData As New DataTable()
Apr 11, 2017 05:41 PM|kaushalparik27|LINK
Did you download & install the Access DB engine (X86 or X64: as per your machine configuration):
Download Microsoft Access Database Engine 2010 Redistributable from Official Microsoft Download Centre or from here:
Alternatively, you can use the
EPPlus library to work with Excel files in .xlsx format. It's free, open source and can be deployed with your application, removing the need to install anything.
Solved - The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine
Apr 12, 2017 03:53 AM|danishdotnet|LINK
My system configuration is 64 bit and MS-Office is 32 bit then tell me what should I do for this error?
Apr 12, 2017 05:41 AM|kaushalparik27|LINK
Did you install above drivers? I guess since you are using MS-Office 32 bit, you will require to turn on 32-bit apps in AppPool under IIS
Apr 12, 2017 05:44 AM|danishdotnet|LINK
Any other solution without Enable 32-Bit Application = true because I have other problem after this set true.