Excel will not create a file but will overwrite a file

Hi I am new to apple script and am having a bit of a problem saving a file.
My script below doesn’t seem to create a new file with the correct name but it will over write a file if it already exists.
If someone was able to point out what I am doing wrong I would greatly appreciate it.
This has been making me crazy all day.
Thank you very much

tell application "Microsoft Excel"
	set theWorkbookFile to "Macintosh HD:Osascript_ForExcel_Shapes:Working:Customer_Campaign_QR_0328.xlsx"
	open theWorkbookFile #open the xls file
	set theWorksheetname to name of worksheet 1 of active workbook
	set theWorksheet to worksheet 1 of active workbook
	set theFile to "Macintosh HD:Osascript_ForExcel_Shapes:Working:Customer_Campaign_QR_0328.csv"
	save as theWorksheet filename theFile file format CSV file format with overwrite #save the file in csv format and overwrite if it exist
end tell

Hi there,

Just noticed your post.
Does this help?


set targetFolder to (path to desktop)

set NameToSaveAs to "thisExcelFile.xlsx"
set NameToSaveAsCSV to "thisCSVfile.csv"

tell application "Microsoft Excel"
	tell active sheet
		save in ((targetFolder as text) & NameToSaveAs)
		save in ((targetFolder as text) & NameToSaveAsCSV) as CSV Windows file format
	end tell
end tell