Link to home
Start Free TrialLog in
Avatar of andrew_optimum
andrew_optimum

asked on

Importing xlsx into Access 2007

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
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andrew_optimum
andrew_optimum

ASKER

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.
upload a copy of the excel file..