AppleScript: set cell background color of Microsoft Excel
1 answer
Two caveats with this answer: you didn't mention which version of Excel and the following was tested in version 2004.
tell application "Microsoft Excel"
set theRange to range "A3:E3"
set interiorObject to interior object of theRange
set color index of interiorObject to 5 -- '5' is only a dummy value; change as needed.
end tell
In the dictionary, color index
there is "a color specified as an index value in the current color palette". In other words, the color index that is light gray in your setup may differ elsewhere.
+2
source to share