SpreadsheetDocument.Open Method (Stream, Boolean)
Office 2010
Creates a new instance of the SpreadsheetDocument class from the IO stream.
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Parameters
- stream
- Type: System.IO.Stream
The IO stream on which to open the package.
- isEditable
- Type: System.Boolean
Return Value
Type: DocumentFormat.OpenXml.Packaging.SpreadsheetDocumentA new instance of SpreadsheetDocument.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when "stream" is null reference. |
| IOException | Thrown when "stream" is not opened with Read (ReadWrite) access. |
| OpenXmlPackageException | Thrown when the package is not valid Open XML SpreadsheetDocument. |