Reply to Different version of Excel - FIXED

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Reply to Different version of Excel - FIXED

Post by Bob Hansen » Tue Oct 09, 2012 12:49 am

For some reason, Reply is not working for me, so I am adding a New Topic with the reply ...

My problem is now FIXED!

For some reason, neither my Windows7, not my Excel installations included the latest Access Database Engine 2010. I downloaded the latest drivers, installed them. Made a User and System DNS ODBC definition for 2003-2010, in addition to the 97-2000 definitions already there.

I modifed my script to the following:

Code: Select all

Let>XLINPUT=C:\Data\Temp\MyInfo.xlsx
Let>connSTR=Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%XLINPUT%;Extended Properties= "Excel 12.0 Xml;HDR=NO";
DBConnect>%connStr%,dbH
That gave me a good connection to the spreadsheet to access the data there.

The site where I got the info about the drivers is here:
http://www.microsoft.com/en-us/download ... x?id=13255

I was able to download drivers from that site.

And here is a summary of some of the connection info they provided to use with the Access Database Endine 2010 drivers:

If you are an application developer using OLEDB, set the Provider argument of the ConnectionString property to "Microsoft.ACE.OLEDB.12.0"

If you are connecting to Microsoft Office Excel data, add the appropriate Extended Properties of the OLEDB connection string based on the Excel file type:

File Type (extension) Extended Properties
---------------------------------------------------------------------
Excel 97-2003 Workbook (.xls) "Excel 8.0"
Excel 2007-2010 Workbook (.xlsx) "Excel 12.0 Xml"
Excel 2007-2010 Macro-enabled workbook (.xlsm) "Excel 12.0 Macro"
Excel 2007-2010 Non-XML binary workbook (.xlsb) "Excel 12.0"

If you are an application developer using ODBC to connect to Microsoft Office Access data, set the Connection String to "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=path to mdb/accdb file"

If you are an application developer using ODBC to connect to Microsoft Office Excel data, set the Connection String to "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=path to xls/xlsx/xlsm/xlsb file"
==============================
And thanks to Me_again for offering to backup my search for ODBC info with Windows7. Hope this reply is in time to save you that work.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Oct 09, 2012 2:07 am

That's good news Bob!

I've had unexplained problems with "reply" on this forum too :?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts