Table of Contents

Method Open

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

Open(Stream, XlsxReadSettings?)

Opens a workbook.

public static XlsxDocument Open(Stream input, XlsxReadSettings? settings = null)

Parameters

input Stream

The .xlsx or .xlsm package, read from the stream's current position to its end. The stream is left open and is not used after this method returns.

settings XlsxReadSettings

The options, or null for the defaults.

Returns

XlsxDocument

The workbook.

Exceptions

ArgumentNullException

input is null.

InvalidDocumentException

The input is not a readable Office Open XML workbook: not a ZIP package, a Word or PowerPoint document, a binary workbook (.xlsb, .xls), or a workbook whose parts are malformed.

DocumentEncryptedException

The workbook is encrypted: open it with its password through DocWright.Spreadsheet.Security (XlsxEncryption.Open).

ResourceLimitExceededException

The input passes one of Limits.