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

    Interface CacheSource

    The source of a pivot cache: the attributes of its <worksheetSource>, or, for a source that is not a worksheet, the whole <cacheSource> element in rawXml. The writer emits each <worksheetSource> attribute only when it has a value, never as "". An r:id in the source (Excel writes one for a source in another workbook) names one of PivotCacheDefinitionData.relationships; the writer drops one that names no kept relationship, because Excel refuses such a file.

    interface CacheSource {
        name?: string;
        rawXml?: string;
        ref: string;
        rId?: string;
        sheet: string;
    }
    Index
    name?: string

    A table or defined name. Excel writes it, with no ref or sheet, for a pivot table made from a table or a named range (<worksheetSource name="Sales"/>).

    rawXml?: string

    A source that is not a worksheet (<cacheSource> type consolidation, external or scenario; Excel writes consolidation for a pivot table over multiple consolidation ranges): the whole <cacheSource> element as read. Opaque: it is written as read in place of the fields above, except that an r:id naming no kept relationship is dropped; delete it to write those instead.

    ref: string

    The source range, such as A1:C5; '' when the file has none (a source given by name).

    rId?: string

    r:id: the relationship naming the workbook that holds the source, for a source in another workbook.

    sheet: string

    The sheet of ref, or of a sheet-scoped name; '' when the file has none.