SetRange

IChartData.SetRange 方法

设置图表数据范围。系列和类别将根据新的数据范围进行更新。如果数据范围中的系列数量大于图表数据中的系列数量,则将向集合的末尾添加与当前集合中的最后一个系列相同类型的附加系列。

public void SetRange(string formula)
参数类型描述
formulaString单元格数据范围公式。例如: “Sheet1!$A$1:$C$4” , “SomeSheetName!A1:B100”, “Sheet1!$A$1:$B$5;Sheet1!$D$1:$D$5”.

异常

exceptioncondition
ArgumentNullExceptionformula 为 null。
ArgumentExceptionformula 格式不正确。

另见