[]
Represents options for opening a workbook.
Use this class to control how workbook data is loaded when using open overloads that accept OpenOptions.
public class OpenOptions
Public Class OpenOptions
OpenOptions options = new OpenOptions();
options.ImportFlags = ImportFlags.Data | ImportFlags.Formulas;
options.DoNotRecalculateAfterOpened = true;
workbook.Open("path/to/workbook.xlsx", null, options);
| Name | Description |
|---|---|
| OpenOptions() | Constructor. |
| Name | Description |
|---|---|
| DoNotRecalculateAfterOpened | Gets or sets whether to skip marking formulas dirty after opening a workbook file. The default value is false. When this property is true, formulas with cached results are not marked dirty after opening, so the cached formula results are returned when calculation is triggered. Formulas without cached results are still marked dirty and recalculated when calculation is triggered. When this property is false, formulas are marked dirty after opening, so formula results are recalculated when calculation is triggered. Calculation can be triggered by operations such as getting formula values or calling Calculate(). |
| ImportFlags | Gets or sets the import flags that control which parts of a workbook are loaded. The default value is NoFlag. |
| InvalidFormulaHandling | Gets or sets how invalid formulas are handled when opening a workbook. The default value is Throw. |