Applescript不会打开Excel 2011工作簿
有人可以告诉我下面的苹果有什么问题吗?
set sourceFile to (choose file with prompt "Choose source files" of type {"XLS6", "XLS7", "XLS8", "XLS", "TXT"} with multiple selections allowed without invisibles) tell application "Microsoft Excel" -- activate open workbook workbook file name sourceFile end tell
我收到以下错误
error "Microsoft Excel got an error: Can't continue open workbook." number -1708
如果我硬编码一个单独的文件path,脚本的工作原理,所以问题必须在设置sourceFile行,但我需要能够select一个文件,因为它不会总是相同的。
尝试这个:
set sourceFile to (choose file with prompt "Choose source files" of type {"XLS6", "XLS7", "XLS8", "XLS", "TXT"} with multiple selections allowed without invisibles) as string tell application "Microsoft Excel" open sourceFile end tell
- 如何使用AppleScript在excel中将单元格值增加1?
- 如何使用苹果脚本创buildMicrosoft Excel文件
- AppleScript从Excel工作表中获取活动单元格的值
- 在Excel 2011中使用Applescript查找和replace
- 如何使用AppleScript重命名文件时保留特殊字符
- 使用AppleScript在Excel中添加多个工作表
- recursion的Excel电子表格input到Applescript iMessage / SMS Messaging
- AppleScript – Apple事件超时
- AppleScript:设置Microsoft Excel单元格的背景颜色