modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface WorkbookData

    The whole workbook data model: what the reader produces and the writer consumes, and what a Workbook wraps.

    interface WorkbookData {
        calcChain?: readonly CalcChainEntryData[];
        calcPr?: CalcPrData | null;
        dateSystem: DateSystem;
        definedNames?: DefinedNameData[];
        docProperties?: DocPropertiesData | null;
        externalReferences?: string[];
        fileVersion?: FileVersionData | null;
        persons?: PersonData[];
        pivotCacheRecords?: PivotCacheRecordsData[];
        pivotCaches?: PivotCacheDefinitionData[];
        preservedContentTypes?: Record<string, string>;
        preservedEntries?: Record<string, number[]>;
        protection?: WorkbookProtectionData | null;
        sharedStrings?: SharedStringsData;
        sheets: SheetData[];
        slicerCaches?: SlicerCacheData[];
        styles: StylesData;
        themeColors?: ThemeColorsData | null;
        timelineCaches?: TimelineCacheData[];
        workbookPr?: WorkbookPrData | null;
        workbookViews?: WorkbookViewData[];
    }
    Index
    calcChain?: readonly CalcChainEntryData[]
    calcPr?: CalcPrData | null

    Calculation settings from <calcPr>.

    dateSystem: DateSystem
    definedNames?: DefinedNameData[]
    docProperties?: DocPropertiesData | null
    externalReferences?: string[]

    ZIP paths of the external link parts (xl/externalLinks/externalLink{n}.xml, kept in preservedEntries) in workbook.xml <externalReferences> order, which formulas use as [n].

    fileVersion?: FileVersionData | null

    Application version from <fileVersion>.

    persons?: PersonData[]

    Persons list for threaded comments (workbook-level).

    pivotCacheRecords?: PivotCacheRecordsData[]

    Pivot cache records (workbook-level): pivotCacheRecords[i] belongs to pivotCaches[i], so a read lists the caches with records first.

    pivotCaches?: PivotCacheDefinitionData[]

    Pivot cache definitions (workbook-level). A read lists the caches that have records first and the caches saved without their data after them, each group in the order of the workbook's relationships, so that pivotCacheRecords[i] belongs to pivotCaches[i]. Find a pivot table's cache by cacheId, not by position.

    preservedContentTypes?: Record<string, string>

    The content type the source [Content_Types].xml declared for each preservedEntries path but a .rels: its Override, else the Default for its extension. On write each recorded type is declared again (as an Override, unless the Default for the extension already gives it), so a part the writer has no rule for (chartEx, ctrlProps, ...) keeps its type. Paths the source declared no type for are absent.

    preservedEntries?: Record<string, number[]>

    ZIP entries the reader keeps as raw bytes rather than in the model: parts it does not model (media, VML, custom XML, external links, printer settings, VBA and the like), worksheet .rels, drawings that are not chart-only, a theme other than the one the writer generates, and a comment, table, drawing, chart, pivot, threaded-comment, person, slicer or timeline part that fails to parse. The writer copies each entry unchanged except where it writes a part at the same path.

    protection?: WorkbookProtectionData | null
    sharedStrings?: SharedStringsData
    sheets: SheetData[]
    slicerCaches?: SlicerCacheData[]

    Slicer cache definitions (workbook-level).

    styles: StylesData
    themeColors?: ThemeColorsData | null
    timelineCaches?: TimelineCacheData[]

    Timeline cache definitions (workbook-level).

    workbookPr?: WorkbookPrData | null

    <workbookPr> attributes other than date1904.

    workbookViews?: WorkbookViewData[]