I'm using this code to import excel files. The files were originally in 97 format but are now xlsx. I'm not sure how the code needs to be changed.
Code: Select all
strFolder = "C:\xxxxx\Import\TTTSMDailyFile\"
strFile = Dir(strFolder & "*.xls")
Do While strFile <> ""
DoCmd.TransferSpreadsheet _
TransferType:=acImport, _
SpreadsheetType:=acSpreadsheetTypeExcel97, _
TableName:="tblCSVImportTemp", _
FileName:=strFolder & strFile, _
HasFieldNames:=True
'Range:="Import"
strFile = Dir
Loop