Share via


ExportPicture Method

Saves the specified chart workspace or PivotTable list as a graphics file.

expression.ExportPicture(FileName, FilterName, Width, Height)

*expression   * An expression that returns a ChartSpace or PivotTable object.

FileName    Optional String. Specifies the name of the saved file. If you do not specify this argument, the default file name is "Chart.gif" for a chart workspace or "Pivot.gif" for a PivotTable list.

FilterName    Optional String. Specifies the name of the graphics filter that is used. Supported filter names are GIF, JPG, and PNG. The default is GIF.

Width    Optional Long. Specifies the width of the graphic, in pixels. You must specify this argument for server-side charts.

Height    Optional Long. Specifies the height of the graphic, in pixels. You must specify this argument for server-side charts.

Example

This example saves the chart workspace as a graphics file.

ChartSpace1.ExportPicture "sales.gif", "gif", 320, 240

Applies to | ChartSpace Object | PivotTable Object

See Also | Export Method | ExportXML Method