Method Open
Open(Stream, XlsxReadSettings?)
Opens a workbook.
public static XlsxDocument Open(Stream input, XlsxReadSettings? settings = null)
Parameters
inputStreamThe
.xlsxor.xlsmpackage, read from the stream's current position to its end. The stream is left open and is not used after this method returns.settingsXlsxReadSettingsThe options, or null for the defaults.
Returns
- XlsxDocument
The workbook.
Exceptions
- ArgumentNullException
inputis 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. This package does not decrypt.
- ResourceLimitExceededException
The input passes one of Limits.