Solved

Importing xlsx into Access 2007

Posted on 2013-05-21
3
657 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
Comment Utility
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
Comment Utility
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
Comment Utility
upload a copy of the excel file..
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
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…

763 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

7 Experts available now in Live!

Get 1:1 Help Now