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

    Interface WriteWarningsEvent

    What WriteOptions.onWarnings is asked to decide on.

    interface WriteWarningsEvent {
        canCancel: boolean;
        origin: IWorkbookIO.Origin;
        save: boolean;
        warnings: WriteWarning[];
        workbook: IWorkbook;
    }

    Hierarchy (View Summary)

    Index
    canCancel: boolean

    Whether returning false will cancel the write.

    true only for a silent re-save to a bound, writable destination — the one case where the bytes would replace a file that may hold what is about to be lost. See WriteOptions.onWarnings for why a prompted write cannot be cancelled.

    The IWorkbookIO.Origin handle the operation actually used — the file read, or the file written: the workbook's own origin for a plain save, a new one for a save that resolved a destination (a first save, a Save As), the target for an export. Its format is the one read or written.

    Uniform across read and write, so an ambient listener (e.g. recent-files) can track "the handle just touched" without branching on the event kind.

    save: boolean

    true for a save (the workbook will be marked clean), false for an export copy.

    Not the same as origin === workbook.getOrigin(): a save that resolved a new destination (a first save, a Save As) moves the workbook to origin only once the write succeeds.

    warnings: WriteWarning[]

    Every warning the write raised, deduplicated, in the order they were first raised.

    workbook: IWorkbook

    The workbook that was read or written. A listener filters on this to react to a specific workbook (the service is shared across all of them).