Avatar of kris_sk2012
kris_sk2012
Flag for United States of America asked on

Excel 2010 connection path + VB

The following connection is used to import data from file in Excel 97-2003 version.
What would the connection path be for Excel 2010?

strSheetPath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strRptDataFile & ";Extended Properties='Excel 8.0;HDR=Yes;IMEX=1';"
    Set cnn = New ADODB.Connection
    cnn.ConnectionString = strSheetPath
    cnn.Open
Microsoft ExcelVB Script

Avatar of undefined
Last Comment
Member_2_861731

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Member_2_861731

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
kris_sk2012

ASKER
Not working yet - I'm getting an import error
Member_2_861731

What's the error?
kris_sk2012

ASKER
"Unable to open file"
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
kris_sk2012

ASKER
Also my OS is Win 7 64 bit.
Member_2_861731

What happened?
kris_sk2012

ASKER
Absolutely no idea. Reinstalled office 2010 and it worked. Thanks a bunch!!!
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Member_2_861731

Glad it helped. :)