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

    A transient scope for persisting styles with a given set of StyleIDs.

    This is done to ensure that styles across multiple sheets are rationalized

    interface IPersistScope {
        endPersist(): void;
        fromJSON(json: IStyleCollection.JSON): void;
        getElementID(json: IStyle.JSON): number | null;
        getElementJSON(id: number): IStyle.JSON;
        toJSON(): IStyleCollection.JSON;
    }
    Index
    • End the persist scope. This will clear the stack and stop tracking access to this.

      Returns void

    • Load a JSON for a StyleCollection object.

      Returns void

      Once this is called the getSharedStyle is available for all the ids defined in the JSON for the current scope.

      Loads INTO the collection: a named or table style in the JSON is added, or replaces the one of that name, and nothing already there is removed. A document load starts from a fresh collection; a sheet loaded into a live workbook brings its styles along and merges. The named and table style collections announce what was loaded.

    • A 0-based style id for the given style. If this is a named style or a style that is not available with the styles then this will return null.

      Parameters

      Returns number | null

      This is a side effect operation. Calling this will cause the style to be persisted as part of the toJSON

    • Given the id return the style. This assumes that the fromJSON has been called previously.

      Parameters

      • id: number

      Returns IStyle.JSON