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

    Interface InSetOption

    The set an BuiltInOperatorNames.InSet condition tests membership of.

    A set is base ∪ additions − subtractions. The base is an existing population, sampled one of two ways: a snapshot (items, dateGroups), resolved when the condition is authored and stored as its members, or live (source), a formula resolved when the condition is evaluated. additions are values the author typed, and subtractions are members taken back out.

    A filter's values list is a snapshot of its column. A validation's typed list is additions with no base, and a validation's range is a live base. Every part is optional and they combine: a range plus a typed Other is source and additions.

    Each part matches by its own rule, the one Excel applies to that kind of list:

    part a value matches when text case a number and its text
    items it is the same distinct value as an item (what UNIQUE tells apart), or shows as one under byDisplay ignored different
    source MATCH(value, source, 0) finds it; *, ? and ~ in the value are wildcards ignored different
    additions its text, trimmed, is an addition without its leading spaces significant the same
    subtractions it is the same distinct value as a subtraction; it then fails whatever else it matched ignored different

    An empty cell is not a value and is no part's to match: the condition's includeBlanks decides it.

    interface InSetOption {
        additions?: readonly string[];
        blank?: boolean;
        byDisplay?: boolean;
        calendarType?: string;
        dateGroups?: readonly DateGroupItem[];
        items?: readonly Scalar[];
        source?: string | IFormula;
        subtractions?: readonly Scalar[];
    }
    Index
    additions?: readonly string[]

    Values the author typed, as text, one entry per item. Excel's typed list (Yes,No).

    An entry is kept as typed. A trailing space is part of it and can never match, as in Excel.

    blank?: boolean

    OOXML's filters/@blank, as a file carries it. Prefer the condition's includeBlanks, which is the blank policy under every host: a reader sets both, and a filter call reads a top-level blank as includeBlanks.

    byDisplay?: boolean

    Match string items against the text a cell SHOWS rather than the value it holds.

    false

    The identity is the value: items: [1] keeps every cell holding 1 however it is formatted, and items: ['1'] keeps the cells holding the text 1. Under byDisplay a string item is instead the displayed text, which is what a spreadsheet's filter list holds: '1.50' keeps a cell holding 1.5 under 0.00, and '$1' one under $0. A typed item is matched by value in both modes.

    byDisplay is a filter's option, the one the column dropdown sets. A conditional format or a data validation has no displayed text to read, so the flag is inert there. Under a filter it also widens what is blank: a string of only spaces shows as nothing and is settled as a blank cell, and a whitespace-only item means includeBlanks. A port of Office Scripts' applyValuesFilter or Apps Script's setVisibleValues passes strings and sets it.

    calendarType?: string

    Calendar type for date group items.

    dateGroups?: readonly DateGroupItem[]

    A snapshot's date groups: a year, a month of a year, a day, down to the second. A date inside any group matches.

    items?: readonly Scalar[]

    A snapshot's members: the values that match, as they were when the condition was authored.

    Matched by value: [1] is every cell holding 1 however it is formatted, and ['1'] the cells holding the text 1. A value that appears later is not a member, which is why a row added under a filter is hidden when the filter is applied again.

    source?: string | IFormula

    A live base: a formula whose result is the list, as formula text without a leading = ($A$1:$A$5, Sheet2!$A$1:$A$9, MyList, OFFSET(...), INDIRECT($E1)).

    Evaluated for each cell, so a relative reference gives each cell its own list, and it follows inserts and deletes as any formula does. A resolved condition holds it as an ICalculation.IFormula.

    subtractions?: readonly Scalar[]

    Members taken out of the set. A value that matches one fails, whatever part it came from.

    What narrows a live base, where a member cannot be removed from the formula. A snapshot needs none: its unchecked members are simply not in items.