Solved

Importing xlsx into Access 2007

Posted on 2013-05-21
3
712 Views
Last Modified: 2013-09-12
Hi,
I am trying to import an xlsx file into access but seem to be having some difficulty.
The code i am using is:
  ' Import into Access:
  DoCmd.TransferSpreadsheet acImport, _
   acSpreadsheetTypeExcel97, strcTableName, _
   strFullPath, True

I think the error is with "acSpreadsheetTypeExcel97" but i am not sure.
Any Ideas?

Kind Regards,
Andrew
0
Comment
Question by:andrew_optimum
[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
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39184488
change this

 DoCmd.TransferSpreadsheet acImport, _
   acSpreadsheetTypeExcel97, strcTableName, _
   strFullPath, True


with


 DoCmd.TransferSpreadsheet acImport, _
   10, strcTableName, _
   strFullPath, True

or

 DoCmd.TransferSpreadsheet acImport, _
   acSpreadsheetTypeExcel12xlm, strcTableName, _
   strFullPath, True
0
 

Author Comment

by:andrew_optimum
ID: 39184509
DoCmd.TransferSpreadsheet acImport, _
   10, strcTableName, _
   strFullPath, True

This gives me the following error: External table is not in the expected format.

 DoCmd.TransferSpreadsheet acImport, _
   acSpreadsheetTypeExcel12xlm, strcTableName, _
   strFullPath, True

This gives me the following error: Could not find installable ISAM.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39184679
upload a copy of the excel file..
0

Featured Post

Industry Leaders: 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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

733 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