Udostępnij za pośrednictwem


OpenXmlPartContainer.DeletePart Method

Definition

Overloads

DeletePart(OpenXmlPart)

Deletes a specified part in the package root layer.

DeletePart(String)

Deletes the specified child part from this part.

DeletePart(OpenXmlPart)

Deletes a specified part in the package root layer.

public bool DeletePart (DocumentFormat.OpenXml.Packaging.OpenXmlPart part);
member this.DeletePart : DocumentFormat.OpenXml.Packaging.OpenXmlPart -> bool
Public Function DeletePart (part As OpenXmlPart) As Boolean

Parameters

part
OpenXmlPart

The part to be deleted.

Returns

True if the part is successfully removed; otherwise, false. This method also returns false if the part was not found or the parameter is null.

Exceptions

Thrown when the part is not referenced by this part.

Applies to

DeletePart(String)

Deletes the specified child part from this part.

public bool DeletePart (string id);
member this.DeletePart : string -> bool
Public Function DeletePart (id As String) As Boolean

Parameters

id
String

The relationship ID of the part to be deleted.

Returns

True if the part is successfully removed; otherwise, false. This method also returns false if the part was not found.

Exceptions

Thrown when "id" is null reference.

Applies to