SpreadsheetDocument.Open SpreadsheetDocument.Open SpreadsheetDocument.Open Method

Definition

Overloads

Open(String, Boolean, OpenSettings) Open(String, Boolean, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the specified file.

Open(Stream, Boolean, OpenSettings) Open(Stream, Boolean, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the IO stream.

Open(String, Boolean) Open(String, Boolean) Open(String, Boolean)

Creates a new instance of the SpreadsheetDocument class from the specified file.

Open(Package, OpenSettings) Open(Package, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the spcified package.

Open(Package) Open(Package)

Creates a new instance of the SpreadsheetDocument class from the spcified package.

Open(Stream, Boolean) Open(Stream, Boolean)

Creates a new instance of the SpreadsheetDocument class from the IO stream.

Open(String, Boolean, OpenSettings) Open(String, Boolean, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the specified file.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : string * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

path
String String String

The path and file name of the target SpreadsheetDocument.

isEditable
Boolean Boolean Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings OpenSettings OpenSettings

The advanced settings for opening a document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when the package is not valid Open XML SpreadsheetDocument.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Open(Stream, Boolean, OpenSettings) Open(Stream, Boolean, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the IO stream.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (System.IO.Stream stream, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : System.IO.Stream * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

stream
Stream Stream Stream

The IO stream on which to open the SpreadsheetDocument.

isEditable
Boolean Boolean Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings OpenSettings OpenSettings

The advanced settings for opening a document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "stream" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML SpreadsheetDocument.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Open(String, Boolean) Open(String, Boolean) Open(String, Boolean)

Creates a new instance of the SpreadsheetDocument class from the specified file.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (string path, bool isEditable);
static member Open : string * bool -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
Public Shared Function Open (path As String, isEditable As Boolean) As SpreadsheetDocument

Parameters

path
String String String

The path and file name of the target Package for the OpenXmlPackage.

isEditable
Boolean Boolean Boolean

In ReadWrite mode. False for Read only mode.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when the package is not valid Open XML SpreadsheetDocument.

Open(Package, OpenSettings) Open(Package, OpenSettings)

Creates a new instance of the SpreadsheetDocument class from the spcified package.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (System.IO.Packaging.Package package, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : System.IO.Packaging.Package * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

package
Package Package Package

The specified OpenXml package.

openSettings
OpenSettings OpenSettings OpenSettings

The advanced settings for opening a document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "package" is not opened with Read (ReadWrite) access.

Thrown when the package is not a valid Open XML document.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Open(Package) Open(Package)

Creates a new instance of the SpreadsheetDocument class from the spcified package.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (System.IO.Packaging.Package package);
static member Open : System.IO.Packaging.Package -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

package
Package Package Package

The specified OpenXml package

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "package" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML SpreadsheetDocument.

Open(Stream, Boolean) Open(Stream, Boolean)

Creates a new instance of the SpreadsheetDocument class from the IO stream.

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Open (System.IO.Stream stream, bool isEditable);
static member Open : System.IO.Stream * bool -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

stream
Stream Stream Stream

The IO stream on which to open the package.

isEditable
Boolean Boolean Boolean

In ReadWrite mode. False for Read only mode.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "stream" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML SpreadsheetDocument.

Applies to