Using the excel.application worksheet.saveas method you need to know the constants

Ron mapped file extensions to FileFormat constant his site:

File Extension ".xlsb" --> XlFileFormat= 50 
File Extension".xlsx"  --> XlFileFormat= 51
File Extension".xlsm"  --> XlFileFormat= 52
File Extension".xls"   --> XlFileFormat= 56
File Extension".csv"   --> XlFileFormat= 6
File Extension".txt"   --> XlFileFormat= -4158
File Extension ".prn"  --> XlFileFormat= 36

full list of XlFileFormat Enumeration

Advertisements