Export (0) Print
Expand All

ExcelService.GetChartImageUrl method

Gets a URL value to the chart or PivotChart image file in a workbook.

Namespace:  Microsoft.Office.Excel.Server.WebServices
Assembly:  Microsoft.Office.Excel.Server.WebServices (in Microsoft.Office.Excel.Server.WebServices.dll)

[WebMethodAttribute]
public string GetChartImageUrl(
	string sessionId,
	Size size,
	string chartName,
	out Status[] status
)

Parameters

sessionId
Type: System.String

The Excel Web Services session ID.

size
Type: Microsoft.Office.Excel.Server.WebServices.Size

The height and width of the requested image. If null (0) or if both the height and width are equal to -1, the original image (default size) is returned.

chartName
Type: System.String

The defined name of a chart or PivotChart in the workbook.

status
Type: []

Alert information.

Return value

Type: System.String
The URL String value to the chart or PivotChart file.

This method returns only one chart. If multiple charts with the same name exist in the workbook, then the first of those charts (as determined by Excel Services) is returned.

This method returns an error if the requested chart or PivotChart does not exist or is not published. The returned URL is valid for the duration of the session. If the chart image has been purged from the cache and the previously generated URL is requested (that is, the URL generated in the same session), the chart image will be recreated and returned.

Community Additions

ADD
Show:
© 2014 Microsoft