0

このスクリプトは、「Microsoft Excel でエラーが発生しました: アクティブなワークブックのワークシート "sheet1" は、グラフ要素の設定メッセージを認識できません。」というエラーによって実行されます。

tell application "Microsoft Excel"
    tell worksheet "Sheet1" of active workbook
        set ochart1 to chart of chart object 1
           tell ochart1
               set chart element chart element 1
               --- create the chart title on chart with value 1
           end tell
    end tell
end tell

ここに画像の説明を入力.

ここに画像の説明を入力

4

2 に答える 2

1

これも機能します。set chart element コマンドを使用してチャート タイトルを作成するのはなぜですか?

tell application "Microsoft Excel"
    tell worksheet "Sheet1" of active workbook
        set ochart1 to chart of chart object 1
        tell ochart1
            set chart title text of it's chart title to "My Title"
        end tell
    end tell
end tell
于 2012-11-08T16:15:12.390 に答える
0

チャートのタイトルを作成したい場合、これは私にとってはうまくいきました:

tell application "Microsoft Excel"
    tell worksheet "Sheet1" of active workbook
        set ochart1 to chart of chart object 1
        tell ochart1
            set has title to true                       
            set caption of its chart title to "your title here"         
        end tell
    end tell
end tell
于 2012-11-08T07:23:25.273 に答える