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?
 
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
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.