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=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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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 MontyWeb Ninja at largeCommented:
I think you want to use version 12 for Office 2007

mystring=mystring & Server.MapPath("2012_SimplifiedItemsForSale.xls")

more info -
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?
Big MontyWeb Ninja at largeCommented:
is office 2007 installed on the server?
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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.
re-install microsoft.ace.oledb.12.exe.  

Do you have another suggestion?
Big MontyWeb Ninja at largeCommented:
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.
OFinOCOwnerAuthor Commented:
Thanks for the suggestion.  I checked.  Everyone has permission.
Big MontyWeb Ninja at largeCommented:
then i would go with the uninstall / reinstall and see how that goes
OFinOCOwnerAuthor Commented:
I'll let you know what happens.
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

From novice to tech pro — start learning today.