Table of Contents

Method ToArray

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

ToArray(XlsxWorkbook, XlsxWriteSettings?)

Writes a workbook and returns the package bytes.

public static byte[] ToArray(XlsxWorkbook workbook, XlsxWriteSettings? settings = null)

Parameters

workbook XlsxWorkbook

The workbook.

settings XlsxWriteSettings

The options, or null for the defaults.

Returns

byte[]

The package.

Exceptions

ArgumentNullException

workbook is null.

ArgumentException

The workbook has no worksheets, or two share a name.

ResourceLimitExceededException

The package exceeds MaxOutputBytes.