Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am reading records from a 2010 Excel spreadsheet via my web application using the following connection string on my developer machine which has Window 7 installed (32-bit):
...OleDbConnection conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath((string)this.ViewState["workfile"]) + ";Extended Properties=\"Excel 8.0;Xml;HDR=NO\"");
All the while, on my Server which has 32 bit Window Server 2008 Standard edition installed, I have to use this old connection string, provided that I have to convert my 2010 excel file to Excel 97- 2003 workbook.
....OleDbConnection conn = new OleDbConnection((string.Concat(new object[] { "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=", base.Server.MapPath((string)this.ViewState["workfile"]), ";Extended Properties=", '"', "Excel 8.0;HDR=NO", '"' })));

On the server I CANNOT READ ANY RECORD AT ALL. And when I used the newer connection string (the first one above) on the server, I am getting this error message:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
What am I doing wrong???
Posted

1 solution

 
Share this answer
 
Comments
Gus'O. 10-Jan-13 8:59am    
Thanks...PIEBALconsult,
Is installing these components on the server safe?
PIEBALDconsult 10-Jan-13 9:05am    
You ask like you're a nazi dentist.

They're from Microsoft; of course they're safe. Or are they?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900