How to manipulate and print a chart in MS Excel from AppleScript?

Posted by Stu Thompson on Stack Overflow See other posts from Stack Overflow or by Stu Thompson
Published on 2010-05-16T14:00:45Z Indexed on 2010/05/16 14:10 UTC
Read the original article Hit count: 427

Filed under:
|
|

With an existing chart in a MS Excel for Mac 2008, in AppleScript, I am trying to do two things:

  1. Rotate a 3D chart 1°
  2. Save the chart as a image (png)

From what I've found on the Intertubes, it seems possible. But AppleScript's awkward verbosity and the lack of non-trivial MS Excel AppleScript examples on the web are too much for me to overcome.

Just for the saving part, this is what I have so far:

tell application "Microsoft Excel"
    activate object worksheet "iozone-16"
    set cht to chart object 1 of active sheet
    tell cht
        #save as chart object [picture type enumeration] [file name Unicode text]
        #Argh!!! 
    end tell
end tell

The 'rotate 1°' task seems to involve "internal objects", but that is as far as I've gotten.

© Stack Overflow or respective owner

Related posts about applescript

Related posts about excel