Solved

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

Posted on 2016-09-17
5
63 Views
Last Modified: 2016-09-22
code.txt

.xls files import fine
but .xslx files are all garbage characters
SAMPLESPEC.xls
SAMPLESPEC.xlsx
Clipboard01.jpg
Clipboard02.jpg
0
Comment
Question by:durick
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 41803220
Which version of Access are you using???

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

ET
0
 
LVL 19
ID: 41803264
here are different AcSpreadSheetType types

https://msdn.microsoft.com/en-us/library/office/ff196017.aspx
0
 

Author Comment

by:durick
ID: 41803627
I'm runing Access 2003, with Excel 2013
0
 
LVL 19

Accepted Solution

by:
crystal (strive4peace) - Microsoft MVP, Access earned 500 total points
ID: 41803822
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
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 41805115
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now