我有以下代码,我希望它打开保存为 .xlsx 的文件,然后使用相同的文件名再次保存它们,但这次保存为 .xls 文件,以便它们与 Excel 2003 兼容
Set app = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
For Each f In fso.GetFolder("Y:\Billing_Common\autoemail").Files
If LCase(fso.GetExtensionName(f)) = "xlsx" Then
Set wb = app.Workbooks.Open(f.Path)
app.DisplayAlerts = False
wb.SaveAs "*.xls*"
wb.Close SaveChanges=True
app.Close
app.Quit
End if
Set f = Nothing
Set fso = Nothing
Next