Solved

Importing xlsx into Access 2007

Posted on 2013-05-21
3
672 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
  • 2
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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 119

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

896 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

11 Experts available now in Live!

Get 1:1 Help Now