Package com.grapecity.documents.excel
Interface IScenarios
Represents the collection of
IScenario objects in the worksheet.-
Method Summary
Modifier and TypeMethodDescriptionCreates a new scenario and adds it to the list of scenarios in the current worksheet.Creates a new scenario and adds it to the list of scenarios of the current worksheet.Creates a new scenario and adds it to the list of scenarios of the current worksheet.Creates a new scenario and adds it to the list of scenarios of the current worksheet.add(String name, IRange changingCells, List<Object> values, String comment, boolean locked, boolean hidden) Creates a new scenario and adds it to the list of scenarios of the current worksheet.get(int index) Gets the scenario using the index.Gets the scenario using the name.intgetCount()Returns the number of objects in the collection.iterator()Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getCount
int getCount()Returns the number of objects in the collection.- Returns:
- The number of objects in the collection.
-
get
Gets the scenario using the index.- Parameters:
index- The index.- Returns:
- The scenario at the specified index.
-
get
Gets the scenario using the name.- Parameters:
name- The scenario name.- Returns:
- The scenario with the specified name.
-
add
Creates a new scenario and adds it to the list of scenarios in the current worksheet. The scenario values are assumed to be the current values in the cells in ChangingCells. The author's name(Document Solutions for Excel) and date are automatically added as the comment text. The scenario is locked to prevent changes.- Parameters:
name- The scenario name.changingCells- A Range object that refers to the changing cells for the scenario.- Returns:
- The new
IScenarioobject.
-
add
Creates a new scenario and adds it to the list of scenarios of the current worksheet. The author's name(Document Solutions for Excel) and date are automatically added as the comment text. The scenario is locked to prevent changes.- 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.- Returns:
- The new
IScenarioobject.
-
add
Creates a new scenario and adds it to the list of scenarios of the current worksheet. The scenario is locked to prevent changes.- 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.comment- A string that specifies comment text for the scenario.- Returns:
- The new
IScenarioobject.
-
add
IScenario add(String name, IRange changingCells, List<Object> values, String comment, boolean locked) Creates a new scenario and adds it to the list of scenarios of the current worksheet.- 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.comment- A string that specifies comment text for the scenario.locked- True to lock the scenario to prevent changes.- Returns:
- The new
IScenarioobject.
-
add
IScenario add(String name, IRange changingCells, List<Object> values, String comment, boolean locked, boolean hidden) Creates a new scenario and adds it to the list of scenarios of the current worksheet.- 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.comment- A string that specifies comment text for the scenario.locked- True to lock the scenario to prevent changes.hidden- True to hide the scenario.- Returns:
- The new
IScenarioobject.
-
iterator
-