OpenXmlPart.getParts()
Return to the
Open XML SDK for JavaScript
Developer CenterGets an array that contains all parts that are targets of relationships from this part.
Syntax
var partsList = OpenXmlPart.getParts()
Return Value
Returns an array of OpenXmlPart objects that contains all parts that this part has relationships to.
Usage
var partsList = pkg.mainDocumentPart().getParts();
Example
// Open a blank document that is stored as a base64 string. var doc = new openXml.OpenXmlPackage(blankDocument_base64); var parts = doc.mainDocumentPart().getParts(); var o = []; for (var i = 0; i < parts.length; i++) { var part = parts[i]; o.push("uri: " + part.uri); o.push("content type: " + part.contentType); o.push(""); } return { output: o };