Table of Contents

Method Apply

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

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?).

public void Apply()

Exceptions

InvalidOperationException

The scenario was removed, or the sheet's scenarios changed since it was read; or a cell is locked on a protected sheet whose protection the workbook honours.