SheetXL - v0.3.20
    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: JSON): void;
        getElementID(json: JSON): number;
        getElementJSON(id: number): JSON;
        toJSON(): JSON;
    }
    Index

    Methods

    • End the persist scope. This will clear the stack and stop tracking access to this.

      Returns void

    • Load a JSON for a StyleCollection object.

      Parameters

      • json: JSON

        IStyleCollection.JSON

      Returns void

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

    • 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

      • json: JSON

      Returns number

      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 JSON

    • This can be called multiple times.

      Returns JSON

      The state as IStyleCollection.JSON.

      Only shared styles that have had the toResourceId called will be shown in the persisted json.