SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface DefaultCriteria

    The default fill a selection implies — which cells it would read, which it would cover, the types that can be offered for it, and the one to open on.

    ICellRange.getDefaultAutoFillCriteria, which answers this for a range.

    interface DefaultCriteria {
        destination: Coords;
        direction: Direction;
        offered: readonly string[];
        presetId: string;
        size: number;
        template: Coords;
        templateSize: number;
    }
    Index
    destination: Coords

    The cells the fill covers — the range itself, or the destination that was asked about.

    direction: Direction

    Which way the series runs — the direction asked for, or the one the range's own shape implies.

    A single row runs across and anything else runs down, which is Excel's own default; a block says nothing either way, so a surface still offers the choice rather than only reporting it.

    offered: readonly string[]

    The Preset.ids that can be offered, in registry order.

    A preset is offered when it applies to ANY line of the range: a column of dates beside a column of numbers offers the date fills, and the numeric column falls back to a copy rather than the entry being greyed for both. WHICH of them a surface lists is its own business — a Series dialog carrying a Trend checkbox leaves the trend presets out.

    presetId: string

    The Preset.id to open on — what the range's leading line already reads as.

    A date series is named at its largest unit (DateSeries), a numeric one is linear, and text falls to series — reading the series off the template is the best guess text can be given, and is what makes test 1, test 2 and Jan, Feb fill as series. Only a selection nothing recognizes falls through to copy, which is the honest answer there.

    size: number

    How many cells deep destination is along direction — the template included.

    template: Coords

    The cells the series is read from — the range's leading CONTENTFUL run along direction.

    Excel seeds from the first cell alone and overwrites everything after it. Taking the leading run instead is what lets a template say something: 1, 5 continues 9, 13, 17 where a one-cell template can only copy. A run covering the whole range would leave nothing to fill, so it falls back to the first line — which is how a column of values gets renumbered.

    Asked with a destination — the fill handle's drag — the template is the whole range as it is, blanks included, because the drag already said what to read.

    templateSize: number

    How many cells deep template is along direction.