如何使用苹果脚本创buildMicrosoft Excel文件

如何使用苹果脚本创build与名称的Excel文件? 在这个脚本中,创build了excel文件,但是没有设置工作簿名称。

tell application "Microsoft Excel" make new workbook at end with properties{name:"MyIndia"} end tell 

尝试:

 tell application "Microsoft Excel" set myWorkbook to make new workbook save workbook as myWorkbook filename "My Workbook Name" end tell 

在保存excel文件之前获取工作簿的名称:

 tell application "Microsoft Excel" set myWorkbook to make new workbook return myWorkbook's name end tell