Click here to Skip to main content
11,930,048 members (43,608 online)
Rate this:
Please Sign up or sign in to vote.
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 9-Jan-13 13:04pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Gus'O. 10-Jan-13 8:59am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100