Document Solutions for Excel, .NET Edition | Document Solutions
GrapeCity.Documents.Excel Namespace / IScenarios Interface / Add Method
The scenario name.
A Range object that refers to the changing cells for the scenario.
A list that contains the scenario values for the cells in ChangingCells. If this argument is omitted, the scenario values are assumed to be the current values in the cells in ChangingCells.
A string that specifies comment text for the scenario. If this argument is omitted, the author's name(Document Solutions for Excel) and date are automatically added as the comment text.
True to lock the scenario to prevent changes. The default value is True.
True to hide the scenario. The default value is False.
In This Topic
    Add Method (IScenarios)
    In This Topic
    Creates a new scenario and adds it to the list of scenarios in the current worksheet.
    Syntax
    IScenario Add( 
       System.string name,
       IRange changingCells,
       System.Collections.Generic.List<object> values,
       System.string comment,
       System.bool locked,
       System.bool hidden
    )

    Parameters

    name
    The scenario name.
    changingCells
    A Range object that refers to the changing cells for the scenario.
    values
    A list that contains the scenario values for the cells in ChangingCells. If this argument is omitted, the scenario values are assumed to be the current values in the cells in ChangingCells.
    comment
    A string that specifies comment text for the scenario. If this argument is omitted, the author's name(Document Solutions for Excel) and date are automatically added as the comment text.
    locked
    True to lock the scenario to prevent changes. The default value is True.
    hidden
    True to hide the scenario. The default value is False.

    Return Value

    Returns the new IScenario object.
    See Also