GetRange

ChartData.GetRange method

Gets chart data range.

public string GetRange()

Return Value

Cells data range formula. E.g: “Sheet1!$A$1:$C$4”

Exceptions

exceptioncondition
InvalidOperationExceptionChart doesn’t use workbook as a data source

Examples

Example C#

using (Presentation pres = new Presentation())
{
    IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.PercentsStackedBar, 0, 0, 100, 100);
    string result = (chart.ChartData as ChartData).GetRange();
}

See Also