ExcelService..::.GetChartImageUrl Method

[This documentation is preliminary and is subject to change.]

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

Visual Basic (Declaration)
<WebMethodAttribute> _
Public Function GetChartImageUrl ( _
    sessionId As String, _
    size As Size, _
    chartName As String, _
    <OutAttribute> ByRef status As Status() _
) As String
Visual Basic (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)
C#
[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: array< Microsoft.Office.Excel.Server.WebServices..::.Status >[]()[] %
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

Tags :


Page view tracker