Method Save
- Namespace
- DocWright.Spreadsheet.Security
- Assembly
- DocWright.Spreadsheet.Security.dll
Save(XlsxDocument, Stream, AgileEncryptionSettings, XlsxWriteSettings?)
Saves a workbook encrypted with a password, as Excel's Encrypt with Password does: agile encryption with the settings' key size, hash and spin count (Excel's own by default: AES-256, SHA-512, 100,000 spins).
public static void Save(XlsxDocument document, Stream output, AgileEncryptionSettings encryption, XlsxWriteSettings? settings = null)
Parameters
documentXlsxDocumentThe workbook.
outputStreamThe stream the encrypted file is written to.
encryptionAgileEncryptionSettingsThe password and the encryption's parameters.
settingsXlsxWriteSettingsThe options the workbook is written with, or null.
Exceptions
- ArgumentNullException
An argument but
settingsis null.- ResourceLimitExceededException
The workbook passes MaxOutputBytes.