Method ToArray
ToArray(XlsxWorkbook, XlsxWriteSettings?)
Writes a workbook and returns the package bytes.
public static byte[] ToArray(XlsxWorkbook workbook, XlsxWriteSettings? settings = null)
Parameters
workbookXlsxWorkbookThe workbook.
settingsXlsxWriteSettingsThe options, or null for the defaults.
Returns
- byte[]
The package.
Exceptions
- ArgumentNullException
workbookis null.- ArgumentException
The workbook has no worksheets, or two share a name.
- ResourceLimitExceededException
The package exceeds MaxOutputBytes.