vijay

vijay

  • NA
  • 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)