Connection to Excel 2007

I have a web site that uses an Excel 2007 spreadsheet to store information for displaying new pages when buttons are clicked.  It has been function for more than a year with the following connection information

mystring="Driver={Microsoft Excel Driver (*.xls)};"
mystring=mystring & "DriverId=790;Dbq="& Server.MapPath("2012_SimplifiedItemsForSale.xls")

This now fails with the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Excel Driver] Reserved error (-5016); there is no message for this error

Searching the web, I found that many people have seen this error, and the recommendation is to use a different OLEDB driver.

I downloaded and installed AccessDatabaseEngine from Microsoft site and changed the code to the following:

mystring="Provider=[Microsoft.ACE.OLEDB.16.0]"
mystring=mystring & Server.MapPath("2012_SimplifiedItemsForSale.xls")

The new error code is:

ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not be properly installed

Q1.  Can anyone tell me if I have properly written the code to use the new OLEDB?
Q2.  Is there another step that must be taken to be able to use the driver software?

Office 2007 is installed in c:\Program Files (x86)

Help. Please.
OFinOCOwnerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I think you want to use version 12 for Office 2007

mystring="Provider=[Microsoft.ACE.OLEDB.12.0]"
mystring=mystring & Server.MapPath("2012_SimplifiedItemsForSale.xls")

more info - https://www.connectionstrings.com/ace-oledb-12-0/
0
OFinOCOwnerAuthor Commented:
Big Money,
Thanks for your comment.
I made the change you suggested, but still get the error.
Does the driver have to be registered?  If so,  how do I do that?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
is office 2007 installed on the server?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

OFinOCOwnerAuthor Commented:
Big Monty.  Thanks for your comment.

Office 2007 is installed on a local development server with Windows 7 Home Premium running IIS 7.  Until recently, the process was working for a year or more on both my test machine (localhost) and on the web site hosted by GoDaddy.

Here is the current connection string and error message.
---------
 Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Server.MapPath("2012_SimplifiedItemsForSale.xls");readonly="false";Extended                          Properties="Excel 12.0;HDR=YES:IMEX=1";
ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.
-------------
I have checked to see if ACEOLEDB.dll is located in the proper place and if it is present in the registry.  It appears in both places.  

My nest steps will be to
uninstall microsoft.ace.oledb.12.exe.
reboot
re-install microsoft.ace.oledb.12.exe.  

Do you have another suggestion?
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
check the permissions on where the dll is. since its your local machine, set it to Everyone (which you can change later) and see if that works.
0
OFinOCOwnerAuthor Commented:
Thanks for the suggestion.  I checked.  Everyone has permission.
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
then i would go with the uninstall / reinstall and see how that goes
0
OFinOCOwnerAuthor Commented:
I'll let you know what happens.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.