The following code works correctly on my local dev machine. But I get the following error message when I deploy it on Azure remote web site. I have looked into SO answers and google search results but it still not clear to me what do I have to install on my local machine so that when I push the code to Azure, the error will go away.
Error Message:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
My code..
string filename = Server.MapPath("/") + "MyExcelDataFile.xlsx";
string connectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES\";", filename);
string query = String.Format("SELECT * from [{0}$]", "myRange1");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
DataTable YourTable = dataSet.Tables[0];