OpenXmlSdkTs - v1.0.7
    Preparing search index...

    Variable ContentTypeConst

    ContentType: {
        calculationChain: "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml";
        cellMetadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml";
        chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml";
        chartColorStyle: "application/vnd.ms-office.chartcolorstyle+xml";
        chartDrawing: "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml";
        chartsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml";
        chartStyle: "application/vnd.ms-office.chartstyle+xml";
        commentAuthors: "application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml";
        connections: "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml";
        coreFileProperties: "application/vnd.openxmlformats-package.core-properties+xml";
        customFileProperties: "application/vnd.openxmlformats-officedocument.custom-properties+xml";
        customization: "application/vnd.ms-word.keyMapCustomizations+xml";
        customProperty: "application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty";
        customXmlProperties: "application/vnd.openxmlformats-officedocument.customXmlProperties+xml";
        diagramColors: "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml";
        diagramData: "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml";
        diagramLayoutDefinition: "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml";
        diagramPersistLayout: "application/vnd.ms-office.drawingml.diagramDrawing+xml";
        diagramStyle: "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml";
        dialogsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml";
        digitalSignatureOrigin: "application/vnd.openxmlformats-package.digital-signature-origin";
        documentSettings: "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml";
        drawings: "application/vnd.openxmlformats-officedocument.drawing+xml";
        endnotes: "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml";
        excelAttachedToolbars: "application/vnd.ms-excel.attachedToolbars";
        extendedFileProperties: "application/vnd.openxmlformats-officedocument.extended-properties+xml";
        externalWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml";
        fontData: "application/x-fontdata";
        fontTable: "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml";
        footer: "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
        footnotes: "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml";
        gif: "image/gif";
        glossaryDocument: "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml";
        handoutMaster: "application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml";
        header: "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml";
        jpeg: "image/jpeg";
        mainDocument: "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml";
        notesMaster: "application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml";
        notesSlide: "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml";
        numberingDefinitions: "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml";
        pict: "image/pict";
        pivotTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml";
        pivotTableCacheDefinition: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml";
        pivotTableCacheRecords: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml";
        png: "image/png";
        presentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml";
        presentationProperties: "application/vnd.openxmlformats-officedocument.presentationml.presProps+xml";
        presentationTemplate: "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml";
        queryTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml";
        relationships: "application/vnd.openxmlformats-package.relationships+xml";
        ribbonAndBackstageCustomizations: "http://schemas.microsoft.com/office/2009/07/customui";
        sharedStringTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml";
        singleCellTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml";
        slicerCache: "application/vnd.openxmlformats-officedocument.spreadsheetml.slicerCache+xml";
        slicers: "application/vnd.openxmlformats-officedocument.spreadsheetml.slicer+xml";
        slide: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml";
        slideComments: "application/vnd.openxmlformats-officedocument.presentationml.comments+xml";
        slideLayout: "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml";
        slideMaster: "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml";
        slideShow: "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml";
        slideSyncData: "application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml";
        styles: "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
        tableDefinition: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml";
        tableStyles: "application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml";
        theme: "application/vnd.openxmlformats-officedocument.theme+xml";
        themeOverride: "application/vnd.openxmlformats-officedocument.themeOverride+xml";
        tiff: "image/tiff";
        trueTypeFont: "application/x-font-ttf";
        userDefinedTags: "application/vnd.openxmlformats-officedocument.presentationml.tags+xml";
        viewProperties: "application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml";
        vmlDrawing: "application/vnd.openxmlformats-officedocument.vmlDrawing";
        volatileDependencies: "application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml";
        webSettings: "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml";
        wordAttachedToolbars: "application/vnd.ms-word.attachedToolbars";
        wordprocessingComments: "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml";
        wordprocessingTemplate: "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml";
        workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml";
        workbookRevisionHeader: "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml";
        workbookRevisionLog: "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml";
        workbookStyles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml";
        workbookTemplate: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml";
        workbookUserData: "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml";
        worksheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml";
        worksheetComments: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml";
        worksheetSortMap: "application/vnd.ms-excel.wsSortMap+xml";
        xmlSignature: "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml";
    } = ...

    Static lookup mapping human-readable content type labels to their full MIME type URIs.

    Type Declaration

    • ReadonlycalculationChain: "application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml"
    • ReadonlycellMetadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml"
    • Readonlychart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
    • ReadonlychartColorStyle: "application/vnd.ms-office.chartcolorstyle+xml"
    • ReadonlychartDrawing: "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml"
    • Readonlychartsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"
    • ReadonlychartStyle: "application/vnd.ms-office.chartstyle+xml"
    • ReadonlycommentAuthors: "application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml"
    • Readonlyconnections: "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml"
    • ReadonlycoreFileProperties: "application/vnd.openxmlformats-package.core-properties+xml"
    • ReadonlycustomFileProperties: "application/vnd.openxmlformats-officedocument.custom-properties+xml"
    • Readonlycustomization: "application/vnd.ms-word.keyMapCustomizations+xml"
    • ReadonlycustomProperty: "application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty"
    • ReadonlycustomXmlProperties: "application/vnd.openxmlformats-officedocument.customXmlProperties+xml"
    • ReadonlydiagramColors: "application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml"
    • ReadonlydiagramData: "application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml"
    • ReadonlydiagramLayoutDefinition: "application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml"
    • ReadonlydiagramPersistLayout: "application/vnd.ms-office.drawingml.diagramDrawing+xml"
    • ReadonlydiagramStyle: "application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml"
    • Readonlydialogsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml"
    • ReadonlydigitalSignatureOrigin: "application/vnd.openxmlformats-package.digital-signature-origin"
    • ReadonlydocumentSettings: "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"
    • Readonlydrawings: "application/vnd.openxmlformats-officedocument.drawing+xml"
    • Readonlyendnotes: "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"
    • ReadonlyexcelAttachedToolbars: "application/vnd.ms-excel.attachedToolbars"
    • ReadonlyextendedFileProperties: "application/vnd.openxmlformats-officedocument.extended-properties+xml"
    • ReadonlyexternalWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"
    • ReadonlyfontData: "application/x-fontdata"
    • ReadonlyfontTable: "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"
    • Readonlyfootnotes: "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"
    • Readonlygif: "image/gif"
    • ReadonlyglossaryDocument: "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml"
    • ReadonlyhandoutMaster: "application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml"
    • Readonlyjpeg: "image/jpeg"
    • ReadonlymainDocument: "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"
    • ReadonlynotesMaster: "application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml"
    • ReadonlynotesSlide: "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml"
    • ReadonlynumberingDefinitions: "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"
    • Readonlypict: "image/pict"
    • ReadonlypivotTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"
    • ReadonlypivotTableCacheDefinition: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
    • ReadonlypivotTableCacheRecords: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"
    • Readonlypng: "image/png"
    • Readonlypresentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml"
    • ReadonlypresentationProperties: "application/vnd.openxmlformats-officedocument.presentationml.presProps+xml"
    • ReadonlypresentationTemplate: "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml"
    • ReadonlyqueryTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml"
    • Readonlyrelationships: "application/vnd.openxmlformats-package.relationships+xml"
    • ReadonlyribbonAndBackstageCustomizations: "http://schemas.microsoft.com/office/2009/07/customui"
    • ReadonlysharedStringTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
    • ReadonlysingleCellTable: "application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml"
    • ReadonlyslicerCache: "application/vnd.openxmlformats-officedocument.spreadsheetml.slicerCache+xml"
    • Readonlyslicers: "application/vnd.openxmlformats-officedocument.spreadsheetml.slicer+xml"
    • Readonlyslide: "application/vnd.openxmlformats-officedocument.presentationml.slide+xml"
    • ReadonlyslideComments: "application/vnd.openxmlformats-officedocument.presentationml.comments+xml"
    • ReadonlyslideLayout: "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"
    • ReadonlyslideMaster: "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml"
    • ReadonlyslideShow: "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml"
    • ReadonlyslideSyncData: "application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml"
    • Readonlystyles: "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"
    • ReadonlytableDefinition: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
    • ReadonlytableStyles: "application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml"
    • Readonlytheme: "application/vnd.openxmlformats-officedocument.theme+xml"
    • ReadonlythemeOverride: "application/vnd.openxmlformats-officedocument.themeOverride+xml"
    • Readonlytiff: "image/tiff"
    • ReadonlytrueTypeFont: "application/x-font-ttf"
    • ReadonlyuserDefinedTags: "application/vnd.openxmlformats-officedocument.presentationml.tags+xml"
    • ReadonlyviewProperties: "application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml"
    • ReadonlyvmlDrawing: "application/vnd.openxmlformats-officedocument.vmlDrawing"
    • ReadonlyvolatileDependencies: "application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml"
    • ReadonlywebSettings: "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"
    • ReadonlywordAttachedToolbars: "application/vnd.ms-word.attachedToolbars"
    • ReadonlywordprocessingComments: "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"
    • ReadonlywordprocessingTemplate: "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"
    • Readonlyworkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
    • ReadonlyworkbookRevisionHeader: "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml"
    • ReadonlyworkbookRevisionLog: "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml"
    • ReadonlyworkbookStyles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
    • ReadonlyworkbookTemplate: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"
    • ReadonlyworkbookUserData: "application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml"
    • Readonlyworksheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
    • ReadonlyworksheetComments: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"
    • ReadonlyworksheetSortMap: "application/vnd.ms-excel.wsSortMap+xml"
    • ReadonlyxmlSignature: "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml"

    Use these labels instead of raw URI strings when working with part content types. Property names match the corresponding part type (e.g., ContentType.mainDocument, ContentType.worksheet, ContentType.slide).

    import { ContentType } from "openxmlsdkts";

    const parts = await pkg.getPartsByContentType(ContentType.mainDocument);
    pkg.addPart("/word/comments.xml", ContentType.wordprocessingComments, "xml", xDoc);