Hey everyone -
I've got a script that cleans up a spreadsheet I have, but am running into trouble when I try to save it.
The source that I get the spreadsheet from saves it in a format that, while it says its .xls, isn't really .xls. I can open the spreadsheet fine and do all of the cleaning I need to but, I but want to be able to force it to save the file as a specific file type (.xls).
Here is my current (relevant) code:
I can't seem put any arguments in the SaveAs line of code beyond the filepath... any ideas?
Thanks!
I've got a script that cleans up a spreadsheet I have, but am running into trouble when I try to save it.
The source that I get the spreadsheet from saves it in a format that, while it says its .xls, isn't really .xls. I can open the spreadsheet fine and do all of the cleaning I need to but, I but want to be able to force it to save the file as a specific file type (.xls).
Here is my current (relevant) code:
Code:
Dim excelPath
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
'where is the Excel file located?
excelPath = "C:\All Fields Report.xls"
'Save and exit
objExcel.ActiveWorkbook.SaveAs excelPath
I can't seem put any arguments in the SaveAs line of code beyond the filepath... any ideas?
Thanks!