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)

Syntax

'Declaration
<WebMethodAttribute> _
Public Function GetChartImageUrl ( _
    sessionId As String, _
    size As Size, _
    chartName As String, _
    <OutAttribute> ByRef status As Status() _
) As String
'Usage
Dim instance As ExcelService
Dim sessionId As String
Dim size As Size
Dim chartName As String
Dim status As Status()
Dim returnValue As String

returnValue = instance.GetChartImageUrl(sessionId, _
    size, chartName, status)
[WebMethodAttribute]
public string GetChartImageUrl(
    string sessionId,
    Size size,
    string chartName,
    out Status[] status
)

Parameters

  • sessionId
    Type: System.String

    The Excel Web Services session ID.

  • 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.

Remarks

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.

See Also

Reference

ExcelService Class

ExcelService Members

Microsoft.Office.Excel.Server.WebServices Namespace