OpenXmlPackage.Clone Method

Definition

Overloads

Clone(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(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(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(Package, OpenSettings)

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

Clone(Stream, Boolean, OpenSettings)

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

Clone(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(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()

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

Clone(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(String, Boolean, OpenSettings)

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

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings? openSettings);

Parameters

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

The cloned document.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(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.

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable);

Parameters

path
String

The path and file name of the target document.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

The cloned document.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(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.

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream, bool isEditable);

Parameters

stream
Stream

The IO stream on which to open the OpenXml package.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(Package, OpenSettings)

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

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Packaging.Package package, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);

Parameters

package
Package

The specified instance of Package.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(Stream, Boolean, OpenSettings)

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

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);

Parameters

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

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(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.

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream);

Parameters

stream
Stream

The IO stream on which to open the OpenXml package.

Returns

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(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.

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Packaging.Package package);

Parameters

package
Package

The specified instance of Package.

Returns

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone()

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

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone ();

Returns

The cloned OpenXml package.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0

Clone(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.

C#
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path);

Parameters

path
String

The path and file name of the target document.

Returns

The cloned document.

Applies to

DocumentFormat.OpenXml 2.20.0 e altre versioni
Prodotto Versioni
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0