Excel File won't Import into Access

  • Thread starter Thread starter Roger Converse
  • Start date Start date
R

Roger Converse

Hello,

I reference an object (Monarch) to create a table that I then want to import
into my Access Database. The file is outputted by default to a .xls
extension and Microsoft Excel 2.1 Worksheet (I am using Office 2003). When
the below command runs, I receive an error indicating that the file is not in
expected format. I have tried all the "TypeExcel#"'s and haven't had any
luck. Any suggestions?

Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"tblVendBO", strExportTable, -1

I also tried to rename the file into a .tab file, however, when I import
that file, it is all jibberish.

Thank you,
Roger
 
acSpreadsheetTypeExcel9 is Excel XP/2002 and Excel 2003 if I remember
correctly.

Possibly change it to acSpreadsheetTypeExcel3 which is an earlier version of
Excel and actually the default for TransferSpreadsheet. It might work better
with an Excel 2.1 file format.
 
Back
Top