OpenXmlPackage.Clone Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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).
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings? openSettings);
member this.Clone : string * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (path As String, isEditable As Boolean, openSettings As OpenSettings) As OpenXmlPackage
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
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.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path, bool isEditable);
member this.Clone : string * bool -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (path As String, isEditable As Boolean) As OpenXmlPackage
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
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.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream, bool isEditable);
member this.Clone : System.IO.Stream * bool -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (stream As Stream, isEditable As Boolean) As OpenXmlPackage
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
Clone(Package, OpenSettings)
Creates a clone of this OpenXml package, opened on the specified instance of Package.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Packaging.Package package, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
member this.Clone : System.IO.Packaging.Package * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (package As Package, openSettings As OpenSettings) As OpenXmlPackage
Parameters
- package
- Package
The specified instance of Package.
- openSettings
- OpenSettings
The advanced settings for opening a document.
Returns
The cloned OpenXml package.
Applies to
Clone(Stream, Boolean, OpenSettings)
Creates a clone of this OpenXml package, opened on the given stream.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
member this.Clone : System.IO.Stream * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (stream As Stream, isEditable As Boolean, openSettings As OpenSettings) As OpenXmlPackage
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
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.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Stream stream);
member this.Clone : System.IO.Stream -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (stream As Stream) As OpenXmlPackage
Parameters
- stream
- Stream
The IO stream on which to open the OpenXml package.
Returns
The cloned OpenXml package.
Applies to
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.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (System.IO.Packaging.Package package);
member this.Clone : System.IO.Packaging.Package -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (package As Package) As OpenXmlPackage
Parameters
- package
- Package
The specified instance of Package.
Returns
The cloned OpenXml package.
Applies to
Clone()
Creates an editable clone of this OpenXml package, opened on a MemoryStream with expandable capacity and using default OpenSettings.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone ();
member this.Clone : unit -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone () As OpenXmlPackage
Returns
The cloned OpenXml package.
Applies to
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.
public DocumentFormat.OpenXml.Packaging.OpenXmlPackage Clone (string path);
member this.Clone : string -> DocumentFormat.OpenXml.Packaging.OpenXmlPackage
Public Function Clone (path As String) As OpenXmlPackage
Parameters
- path
- String
The path and file name of the target document.
Returns
The cloned document.