Return to the
Open XML SDK for JavaScript
Developer Center
Gets an array that contains all parts of the opened OpenXmlPackage object.


    var partsList = OpenXmlPackage.getParts()

Return Value

    Returns an array of OpenXmlPart objects that contains all parts of the document.


    var partsList = OpenXmlPackage.getParts();


// Open a blank document that is stored as a base64 string.
var doc = new openXml.OpenXmlPackage(blankDocument_base64);
// Get a list of all parts in the document and list them in the output text area.
var parts = doc.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);
return { output: o };