SpreadsheetDocument.Create SpreadsheetDocument.Create SpreadsheetDocument.Create Method

Definition

Overloads

Create(Package, SpreadsheetDocumentType) Create(Package, SpreadsheetDocumentType)

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

Create(Stream, SpreadsheetDocumentType) Create(Stream, SpreadsheetDocumentType)

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

Create(String, SpreadsheetDocumentType) Create(String, SpreadsheetDocumentType) Create(String, SpreadsheetDocumentType)

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

Create(Package, SpreadsheetDocumentType, Boolean) Create(Package, SpreadsheetDocumentType, Boolean)

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

Create(Stream, SpreadsheetDocumentType, Boolean) Create(Stream, SpreadsheetDocumentType, Boolean)

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

Create(String, SpreadsheetDocumentType, Boolean) Create(String, SpreadsheetDocumentType, Boolean) Create(String, SpreadsheetDocumentType, Boolean)

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

Create(Package, SpreadsheetDocumentType) Create(Package, SpreadsheetDocumentType)

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

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Create (System.IO.Packaging.Package package, DocumentFormat.OpenXml.SpreadsheetDocumentType type);
static member Create : System.IO.Packaging.Package * DocumentFormat.OpenXml.SpreadsheetDocumentType -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

package
Package Package Package

The specified OpenXml package

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "package" is not opened with Write access.

Create(Stream, SpreadsheetDocumentType) Create(Stream, SpreadsheetDocumentType)

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

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Create (System.IO.Stream stream, DocumentFormat.OpenXml.SpreadsheetDocumentType type);
static member Create : System.IO.Stream * DocumentFormat.OpenXml.SpreadsheetDocumentType -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

stream
Stream Stream Stream

The IO stream on which to open the package.

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "stream" is not opened with Write access.

Create(String, SpreadsheetDocumentType) Create(String, SpreadsheetDocumentType) Create(String, SpreadsheetDocumentType)

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

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Create (string path, DocumentFormat.OpenXml.SpreadsheetDocumentType type);
static member Create : string * DocumentFormat.OpenXml.SpreadsheetDocumentType -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument
Public Shared Function Create (path As String, type As SpreadsheetDocumentType) As SpreadsheetDocument

Parameters

path
String String String

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

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Create(Package, SpreadsheetDocumentType, Boolean) Create(Package, SpreadsheetDocumentType, Boolean)

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

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Create (System.IO.Packaging.Package package, DocumentFormat.OpenXml.SpreadsheetDocumentType type, bool autoSave);
static member Create : System.IO.Packaging.Package * DocumentFormat.OpenXml.SpreadsheetDocumentType * bool -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

package
Package Package Package

The specified OpenXml package.

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

autoSave
Boolean Boolean Boolean

Whether to auto save the created document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "package" is not opened with Write access.

Create(Stream, SpreadsheetDocumentType, Boolean) Create(Stream, SpreadsheetDocumentType, Boolean)

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

public static DocumentFormat.OpenXml.Packaging.SpreadsheetDocument Create (System.IO.Stream stream, DocumentFormat.OpenXml.SpreadsheetDocumentType type, bool autoSave);
static member Create : System.IO.Stream * DocumentFormat.OpenXml.SpreadsheetDocumentType * bool -> DocumentFormat.OpenXml.Packaging.SpreadsheetDocument

Parameters

stream
Stream Stream Stream

The IO stream on which to create the SpreadsheetDocument.

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

autoSave
Boolean Boolean Boolean

Whether to auto save the created document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Thrown when "stream" is not opened with Write access.

Create(String, SpreadsheetDocumentType, Boolean) Create(String, SpreadsheetDocumentType, Boolean) Create(String, SpreadsheetDocumentType, Boolean)

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

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

Parameters

path
String String String

The path and file name of the target SpreadsheetDocument.

type
SpreadsheetDocumentType SpreadsheetDocumentType SpreadsheetDocumentType

The type of the SpreadsheetDocument.

autoSave
Boolean Boolean Boolean

Whether to auto save the created document.

Returns

A new instance of SpreadsheetDocument.

Exceptions

Applies to