Solved

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

Posted on 2016-09-17
5
88 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 20
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 20

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

738 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