For AI agents: the complete documentation index is available at https://a3s-lab.github.io/Office/docs/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/Office/docs/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/Office/docs/en/components/spreadsheet.md.
  • English
  • latest
  • SpreadsheetEditor

    SpreadsheetEditor is a controlled workbook surface with worksheet, formula, chart, conditional-format, pivot, and print-layout models.

    Properties

    PropertyTypeRequiredDefaultDescription
    contentSpreadsheetContentYesControlled workbook content.
    onChange(content: SpreadsheetContent) => voidYesEmits the complete next workbook.
    previewbooleanNofalseRead-only workbook rendering.
    saveStatusstringNo'Saved automatically'Host-owned save status.
    fileActionsreadonly OfficeFileAction[]No[]Host save, export, history, and approval actions.
    kernelWasmUrlstringNopackaged kernelFormula and workbook-kernel resource URL.
    onAgentRequest(request: EditorAgentRequest) => void | Promise<void>NoSends the active cell or range to the host AI flow.
    theme'light' | 'dark' | 'system'No'system'Color mode.

    Content contract

    FieldTypeDescription
    type'spreadsheet'Content discriminator.
    sheetsWorkSpreadsheetSheet[]Worksheets, cells, formulas, styles, images, charts, and pivots.
    calculationWorkSpreadsheetCalculationSettingsCalculation mode, iteration, precision, and load behavior.
    namedRangesWorkSpreadsheetNamedRange[]Workbook- and worksheet-scoped names.
    printAreas, printTitlesspreadsheet print fieldsPrint areas and repeated rows or columns.
    pageBreaks, pageSetupsspreadsheet page fieldsBreaks, paper, orientation, scale, margins, headers, and footers.

    The public workbook extension context is not yet stable. Use fileActions for host workflows and onAgentRequest for structured AI actions. Do not import command runtime modules from internal package paths.