DoCmd.TransferSpreadsheet acImport works with .xls but fails with .xslx files

code.txt

.xls files import fine
but .xslx files are all garbage characters
SAMPLESPEC.xls
SAMPLESPEC.xlsx
Clipboard01.jpg
Clipboard02.jpg
durickAsked:
Who is Participating?

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

x
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.

Eric ShermanAccountant/DeveloperCommented:
Which version of Access are you using???

For XLSX files you would probably need Access 2007 and later versions.

ET
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
here are different AcSpreadSheetType types

https://msdn.microsoft.com/en-us/library/office/ff196017.aspx
0
durickAuthor Commented:
I'm runing Access 2003, with Excel 2013
0
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
you must use the same version of Access and Excel to do automation. Ok if the workbooks are a different format but the application versions you are running must match. Access 2003 cannot read an Excel 2013 file. A duct-tape work-around would be to try saving the Excel file in XLS format. I would be interested to know if you care to test -- since you are using TransferSpreadsheet instead of actually opening and manipulating the file, it might work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eric ShermanAccountant/DeveloperCommented:
XLS is the default file format for the 2003 version of Excel and older while XLSX for versions since 2007

Save the .XLSX file as .XLS if you are using Access 2003.

ET
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
Microsoft Access

From novice to tech pro — start learning today.