[]
        
(Showing Draft Content)

IScenarios

Interface IScenarios

All Superinterfaces:
Iterable<IScenario>

public interface IScenarios extends Iterable<IScenario>
Represents the collection of IScenario objects in the worksheet.
  • Method Details

    • getCount

      int getCount()
      Returns the number of objects in the collection.
      Returns:
      The number of objects in the collection.
    • get

      IScenario get(int index)
      Gets the scenario using the index.
      Parameters:
      index - The index.
      Returns:
      The scenario at the specified index.
    • get

      IScenario get(String name)
      Gets the scenario using the name.
      Parameters:
      name - The scenario name.
      Returns:
      The scenario with the specified name.
    • add

      IScenario add(String name, IRange changingCells)
      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 IScenario object.
    • add

      IScenario add(String name, IRange changingCells, List<Object> values)
      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 IScenario object.
    • add

      IScenario add(String name, IRange changingCells, List<Object> values, String comment)
      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 IScenario object.
    • 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 IScenario object.
    • 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 IScenario object.
    • iterator

      Iterator<IScenario> iterator()
      Specified by:
      iterator in interface Iterable<IScenario>