Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

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
0
durick
Asked:
durick
  • 2
  • 2
1 Solution
 
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
 
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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now