Table of Contents

Class XlsxScenario

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

A scenario of a worksheet (Phase 218): a named set of values for its changing cells, as Excel's Scenario Manager keeps one in the sheet's scenarios list.

public sealed class XlsxScenario
Inheritance
XlsxScenario
Inherited Members

Properties

ChangingCells

Gets the changing cells, one reference each (as B1), in the order the scenario lists them.

Comment

Gets the scenario's comment, or null.

Hidden

Gets whether the scenario is hidden from Excel's list while the sheet is protected.

Locked

Gets whether the scenario is locked against changes while the sheet is protected.

Name

Gets the scenario's name.

User

Gets the name of who made the scenario, as the file states it, or null.

Values

Gets the values, one for each changing cell, as the scenario stores them: the text typed into Excel's dialog (6.25, 12.5%, TRUE, shown text).

Methods

Apply()

Writes the scenario's values into its changing cells, as Excel's Show does, and marks the scenario the one shown. Each value is entered as Excel types an entry (measured): TRUE/FALSE a logical value, a number a number (007 is 7), a percentage its fraction with a percent format (12.5% is 0.125 shown 0.00%), a number with an exponent shown 0.00E+00, anything else text; an empty value empties the cell. A formula in a changing cell is replaced. Formulas that depend on the cells keep their last values until Calculate(XlsxCalculationOptions?).

Remove()

Takes the scenario off its sheet's list (and the list itself when it empties).

ToString()