Ask Your Question
0

Calc: need macro ExportAsGraph help

asked 2018-11-03 06:15:52 +0200

Todd2 gravatar image

Hi All,

When I Record macro and export a graph as a PNG, the recorder dutifully records except the export. Instead I get

rem dispatcher.executeDispatch(document, ".uno:ExportAsGraphic", "", 0, Array())

Removing the remark and it still does nothing.

Is the a best way to export a graph?

Many thanks, -T

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-11-03 18:45:07 +0200

Ratslinger gravatar image

Hello,

Using Record macro will seldom give you the necessary code when performing more complex procedures as this.

There is a macro by hanya on this post -> Re: Macro: Save Graphs as Images (many of them!). The macro works almost as is.

It is necessary to understand first that images (pictures, graphs, buttons, etc) are stored on the DrawPage. You need to be able to get at the specific item you want to export. Make sure you have given the chart a name and you can use this name in determining if the indexed object is the chart you want. You also need to specify the name of the saved image and also the place to save it in.

edit flag offensive delete link more

Comments

Thank you!

Todd2 gravatar imageTodd2 ( 2018-11-03 20:55:36 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-03 06:15:52 +0200

Seen: 26 times

Last updated: Nov 03 '18