Skip to content
Document Authoring DA  API Docs v1.22.2
npmGitHub

LoadSpreadsheetOptions

LoadSpreadsheetOptions:

Options for DocAuthSystem.loadSpreadsheet.

Experimental: the spreadsheet API may change or be removed in any release, including minor and patch releases.

Carries the same progress and cancellation as ImportSpreadsheetConfig: a saved spreadsheet of a million rows takes as long to open as the .xlsx it came from, so a host needs to report it either way.

// Reopening a million-row spreadsheet is as slow as importing one, so report it the same way, phase by phase
const spreadsheet = await system.loadSpreadsheet(saved, {
onProgress: ({ phase, done, total }) => showProgress(phase, total === null ? null : Math.min(1, done / total)),
});

readonly optional abortSignal: AbortSignal

Aborts the load. A cancelled load rejects; it never resolves with a partly-read spreadsheet.


readonly optional onProgress: (progress) => void

Called while the spreadsheet opens, at most about ten times a second.

SpreadsheetImportProgress

void