[]
Represents options for opening an XLSX file.
Use this class to configure how a workbook is loaded through workbook open APIs that accept OpenOptionsBase. It supports settings such as the file password, import flags, recalculation behavior after loading, row auto-fit behavior, and digital-signature-only mode.
public class XlsxOpenOptions : OpenOptionsBase
Public Class XlsxOpenOptions
Inherits OpenOptionsBase
XlsxOpenOptions options = new XlsxOpenOptions();
string password = GetWorkbookPassword();
options.Password = password;
options.DoNotRecalculateAfterOpened = true;
workbook.Open("path/to/workbook.xlsx", options);
| Name | Description |
|---|---|
| XlsxOpenOptions() | Constructor. |
| Name | Description |
|---|---|
| DigitalSignatureOnly | Gets or sets whether to open the workbook in digital signature only mode. In the digital signature only mode, existing signatures will be preserved unless you called Delete(). But you can only sign existing signature lines, add invisible signatures, remove digital signature of signed signature lines, or remove invisible signatures in this mode. Other changes will be discarded. After modifying digital signatures, you need to save the workbook to commit changes. true to open workbook in digital signature only mode. Otherwise, use normal mode. The default value is false. |
| DoNotAutoFitAfterOpened | Gets or sets whether automatic row-height fitting after loading the file is disabled. When this property is true, row heights are not auto-fitted after the workbook is opened. The default value is false. |
| DoNotRecalculateAfterOpened | Gets or sets whether to skip marking formulas dirty after opening an XLSX 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 an .xlsx workbook are loaded. The default value is NoFlag. |
| InvalidFormulaHandling | Gets or sets how invalid formulas are handled when opening a workbook. Default is Throw. |
| Password | Gets or sets the password for the xlsx file. Use this property to configure the password before opening a password-protected xlsx file. |