Link to home
Create AccountLog in
Avatar of zimmer9
zimmer9Flag for United States of America

asked on

Which file type would you use to save an Excel 2007 xlsx as, when importing an Excel file into an Access 2003 database?

I am working with an Access 2003 application using VBA code and I also am trying to import an Excel 2007 file with an extension of XLSX.

My VBA code to import Excel files is as follows:

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Bank Credits (A)", filenm, False, "Bank Credits (A)!A:N"

If I open the XLSX file and want to save it in Excel 2003 format so that I can import the file into my Access 2003 application, I notice that after I open the XLSX file, the file can be saved to file types as follows:

Microsoft Office Excel Workbook (*.xls)
Microsoft Office Excel 5.0/95 Workbook (*.xls)
Microsoft Excel 97 Excel 2003 & 5.0/95 Workbook (*.xls)

Which of these choices would you recommend? They all seem to work but I wanted advice on which choice is best.
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
But to be sure, check the *exact* definitions of these constants:
   acSpreadsheetTypeExcel9

Do web search, or see the VBA Help files....