0

我有两个 excel 文档,一个是模板,我想使用 applescript 将内容从一个 excel 文档复制到寺庙 excel 文档。

文件 1
ABC
DEF

文件 2

我必须将内容从文档 1 传输到文档 2。

提前致谢。

4

1 回答 1

0

尝试:

tell application "Microsoft Excel"
    set myData to value of range "A1:C3" of worksheet "Sheet1" of workbook "Workbook1"
    set value of range "A1:C3" of worksheet "Sheet1" of workbook "Workbook2" to myData
end tell

编辑

tell application "Microsoft Excel"
    set targetRange to "A1:C3"
    set sourceRange to range targetRange of worksheet "Sheet1" of workbook "Workbook1"
    set destRange to range targetRange of worksheet "Sheet1" of workbook "Workbook2"
    copy range sourceRange destination destRange
end tell
于 2013-10-22T13:05:16.043 回答