1

我是 Applescripts 和 Excel 08 的新手?我想写一个在 Excel 08 特定颜色中任意预选单元格的颜色。我可以让它在预选的单元格中写下需要,甚至加粗字体……但由于某种原因,它不会改变单元格的颜色……

print("Tell application "Microsoft Excel"
activate
set formula of active cell to "excellent answer"
set bold of font object of active cell to true
activate cell active cell");

这部分由于某种原因不起作用`

print("tell interior object of active cell of active sheet
    set color index to 3
    set pattern to pattern gray 50
    set pattern color index to 13
end tell");

不知道为什么

4

1 回答 1

1

我能够使用以下 AppleScript 在 Excel 08(现在是 2011)中设置特定单元格的颜色:

tell sheet "Sheet1" of theWorkbook    
set color of interior object of range C2:C2 to {255, 255, 0}
end tell

我必须在特定范围内指定颜色并使用红色、蓝色和绿色分量值(从 0 到 255)。

于 2011-01-28T14:10:00.433 回答