[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IScenarios.Add

Add Method

Add(string, IRange, List<object>, string, bool, bool)

创建一个新方案并将其添加到当前工作表的方案列表中。

Declaration
IScenario Add(string name, IRange changingCells, List<object> values = null, string comment = null, bool locked = true, bool hidden = false)
Parameters
Type Name Description
string name

方案名称。

IRange changingCells

一个引用方案的可变单元格范围对象。

List<object> values

一个包含方案中可变单元格的值的列表。 如果省略此参数,则假设方案值为 ChangingCells 中单元格的当前值。

string comment

一个用于指定方案的注释文本的字符串。如果省略此参数,作者的名称(Excel 文档解决方案)和日期将自动作为注释文本添加。

bool locked

如果为 true,则锁定方案以防止更改。 默认值是True。

bool hidden

如果为 true,则隐藏该方案。默认值是False。

Returns
Type Description
IScenario

返回新的 IScenario对象。