New to Telerik Document ProcessingStart a free 30-day trial

Formula-based chart data that resolves to cell ranges within a workbook for dynamic chart series and values.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Charts

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class WorkbookFormulaChartData : FormulaChartData, IChartData

Inheritance: objectFormulaChartDataWorkbookFormulaChartData

Implements: IChartData

Inherited Members FormulaChartData.ChartDataTypeFormulaChartData.Formula

Constructors

Initializes a new WorkbookFormulaChartData with a formula string that references chart data in the workbook.

C#
public WorkbookFormulaChartData(Workbook workbook, string formula)
Parameters:workbookWorkbook

The workbook the formula refer to.

formulastring

The formula which refers to the chart data.

Initializes a new WorkbookFormulaChartData from cell ranges in the specified worksheet.

C#
public WorkbookFormulaChartData(Worksheet worksheet, params CellRange[] ranges)
Parameters:worksheetWorksheet

The worksheet the ranges refer to.

rangesCellRange[]

The ranges that refer to the chart data.

Methods

Creates a deep copy of this chart data instance with the same formula and workbook reference.

C#
public override IChartData Clone()
Returns:

IChartData

The deep copy of the object.

Overrides: FormulaChartData.Clone()

Resolves the formula to cell ranges and returns them along with the containing worksheet.

C#
public IEnumerable<CellRange> EnumerateCellRanges(out Worksheet worksheet)
Parameters:worksheetWorksheetReturns:

IEnumerable<CellRange>

The result cell ranges.

Exceptions:

FormatException

Thrown when the formula referring to the data cannot be parsed to cell ranges.

Attempts to resolve the formula to cell ranges and returns whether the resolution succeeded.

C#
public bool TryEnumerateCellRanges(out IEnumerable<CellRange> resultCellRanges, out Worksheet worksheet)
Parameters:resultCellRangesIEnumerable<CellRange>

The result cell ranges.

worksheetWorksheet

The worksheet the cell ranges are located in.

Returns:

bool

A value indicating whether the ranges have been retrieved.

Properties

The workbook containing the cell ranges referenced by this chart data formula.

C#
public Workbook Workbook { get; }