如何使用apple脚本创建名称为excel的文件? 在此脚本中,将创建excel文件,但未设置工作簿名称。
tell application "Microsoft Excel"
make new workbook at end with properties{name:"MyIndia"}
end tell
答案 0 :(得分:0)
尝试:
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