Forums - C# Corner

Forum guidelines
vijay

vijay

  • 0
  • 43
  • 0

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

Feb 1 2011 10:33 AM
Hello,

 When i try to read data from .xlsx, that time its given me the following error.

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

i have used following connection string and also Provider=Microsoft.ACE.OLEDB.12.0 has been installed on server.


if (strFileType.Trim() == ".xls")
            {
                connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strNewPath + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
            }
            else if (strFileType.Trim() == ".xlsx")
            {
               connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strNewPath + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";  

            }

If any one know about this error please help me.


Thanks


Answers (5)

Download Free eBooks

SPONSORED BY

File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!