Create, Manipulate or Remove Scenarios from Worksheets

Contents
[ ]

Aspose.Cells provides some useful classes, for example, ScenarioCollection, Scenario, ScenarioInputCellCollection, and ScenarioInputCell classes. It also provides the Worksheet.Scenarios property. The sample code below opens an XLSX Excel file that contains some scenarios and removes an existing scenario. It also adds a new scenario to the worksheet before saving the Excel file. The example uses a very simple template file that contains a scenario.