Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells provides some useful classes, for example ScenarioCollection, Scenario, ScenarioInputCellCollection and ScenarioInputCell. 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 from the worksheet. It also adds a new scenario before saving the Excel file. It uses a very simple template file that contains a scenario.
After executing the code, an existing scenario is removed and a new scenario is added to the worksheet.
The output file

Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.