다음을 통해 공유


CloneableExtensions.Clone Method

Definition

Overloads

Clone<TPackage>(TPackage)

Creates an editable clone of this OpenXml package, opened on a MemoryStream with expandable capacity and using default OpenSettings.

Clone<TPackage>(TPackage, Package)

Creates a clone of this OpenXml package, opened on the specified instance of Package. The clone will be opened with the same OpenSettings as this OpenXml package.

Clone<TPackage>(TPackage, Stream)

Creates a clone of this OpenXml package, opened on the given stream. The cloned OpenXml package is opened with the same settings, i.e., FileOpenAccess and OpenSettings, as this OpenXml package.

Clone<TPackage>(TPackage, String)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package). The cloned OpenXml package is opened with the same settings, i.e., FileOpenAccess and OpenSettings, as this OpenXml package.

Clone<TPackage>(TPackage, Package, OpenSettings)

Creates a clone of this OpenXml package, opened on the specified instance of Package.

Clone<TPackage>(TPackage, Stream, Boolean)

Creates a clone of this OpenXml package, opened on the given stream. The cloned OpenXml package is opened with the same OpenSettings as this OpenXml package.

Clone<TPackage>(TPackage, String, Boolean)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package). The cloned OpenXml package is opened with the same OpenSettings as this OpenXml package.

Clone<TPackage>(TPackage, Stream, Boolean, OpenSettings)

Creates a clone of this OpenXml package, opened on the given stream.

Clone<TPackage>(TPackage, String, Boolean, OpenSettings)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package).

Clone<TPackage>(TPackage)

Creates an editable clone of this OpenXml package, opened on a MemoryStream with expandable capacity and using default OpenSettings.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, Package)

Creates a clone of this OpenXml package, opened on the specified instance of Package. The clone will be opened with the same OpenSettings as this OpenXml package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, System.IO.Packaging.Package package) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * System.IO.Packaging.Package -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, package As Package) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
package
Package

The specified instance of Package.

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, Stream)

Creates a clone of this OpenXml package, opened on the given stream. The cloned OpenXml package is opened with the same settings, i.e., FileOpenAccess and OpenSettings, as this OpenXml package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, System.IO.Stream stream) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * System.IO.Stream -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, stream As Stream) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
stream
Stream

The IO stream on which to open the OpenXml package.

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, String)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package). The cloned OpenXml package is opened with the same settings, i.e., FileOpenAccess and OpenSettings, as this OpenXml package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, string path) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * string -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, path As String) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
path
String

The path and file name of the target document.

Returns

TPackage

The cloned document.

Applies to

Clone<TPackage>(TPackage, Package, OpenSettings)

Creates a clone of this OpenXml package, opened on the specified instance of Package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, System.IO.Packaging.Package package, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * System.IO.Packaging.Package * DocumentFormat.OpenXml.Packaging.OpenSettings -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, package As Package, openSettings As OpenSettings) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
package
Package

The specified instance of Package.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, Stream, Boolean)

Creates a clone of this OpenXml package, opened on the given stream. The cloned OpenXml package is opened with the same OpenSettings as this OpenXml package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, System.IO.Stream stream, bool isEditable) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * System.IO.Stream * bool -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, stream As Stream, isEditable As Boolean) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
stream
Stream

The IO stream on which to open the OpenXml package.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, String, Boolean)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package). The cloned OpenXml package is opened with the same OpenSettings as this OpenXml package.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, string path, bool isEditable) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * string * bool -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, path As String, isEditable As Boolean) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
path
String

The path and file name of the target document.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

TPackage

The cloned document.

Applies to

Clone<TPackage>(TPackage, Stream, Boolean, OpenSettings)

Creates a clone of this OpenXml package, opened on the given stream.

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, System.IO.Stream stream, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * System.IO.Stream * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, stream As Stream, isEditable As Boolean, openSettings As OpenSettings) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
stream
Stream

The IO stream on which to open the OpenXml package.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

TPackage

The cloned OpenXml package.

Applies to

Clone<TPackage>(TPackage, String, Boolean, OpenSettings)

Creates a clone of this OpenXml package opened from the given file (which will be created by cloning this OpenXml package).

public static TPackage Clone<TPackage> (this TPackage openXmlPackage, string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings? openSettings) where TPackage : DocumentFormat.OpenXml.Packaging.OpenXmlPackage;
static member Clone : 'Package * string * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> 'Package (requires 'Package :> DocumentFormat.OpenXml.Packaging.OpenXmlPackage)
<Extension()>
Public Function Clone(Of TPackage As OpenXmlPackage) (openXmlPackage As TPackage, path As String, isEditable As Boolean, openSettings As OpenSettings) As TPackage

Type Parameters

TPackage

Parameters

openXmlPackage
TPackage
path
String

The path and file name of the target document.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

TPackage

The cloned document.

Applies to