2

Excel Editor

Edit Excel workbooks with formula input, undo and redo, sheet controls, merge tools, export, and live grid updates.

The Excel Editor is an experimental spreadsheet editing surface built on top of @extend-ai/react-xlsx. It keeps the viewer shell familiar while enabling direct workbook mutations through the package editing API.

"use client";

import { XlsxEditorPreview } from "@/components/ui/xlsx-editor";

export function XlsxEditorExample() {
  return <XlsxEditorPreview src="/path/to/workbook.xlsx" />;
}

Installation

pnpm dlx shadcn@latest add https://ui.extend.ai/r/xlsx-editor.json

Useful behaviors

  • Formula bar shows the selected cell's formula, or its display value when no formula is present.
  • Undo, redo, merge, unmerge, sheet add/remove, and export are wired through react-xlsx editing APIs.
  • Sheet tabs, workbook loading, upload, zoom, table sorting, and dark workbook rendering match the Excel Viewer.
  • Large workbooks automatically fall back to read-only behavior above the editor threshold.

API Reference

XlsxEditorPreview

The XlsxEditorPreview component renders an editable Excel workbook with upload, theme, zoom, formula editing, sheet controls, and export.

PropTypeDefaultRequired
classNamestring-No
defaultIsDarkbooleanfalseNo
fileNamestring-No
isDarkboolean-No
onIsDarkChange(isDark: boolean) => void-No
roundedbooleanfalseNo
srcstring-No