cycyexcel
中文0.2.0

EXAMPLES

Multi-sheet workbook

createWorkbook() provides bottom tabs, active-sheet switching, and an add-sheet button.

One workbook, independent sheets

Each sheet has its own CyExcelCore, with independent column configuration, data, selection, and undo history.

ts
const workbook = createWorkbook(container, {
  newSheetRows: 1000,
  sheets: [
    { name: "Order details", columns, snapshot: orderSnapshot },
    { name: "Regional summary", columns: summaryColumns, snapshot: summarySnapshot }
  ]
});

workbook.getActiveSheet().insertRows(0, 1);

Workbook tabs

Use bottom tabs to switch sheets and + to add one. Row operations use the active sheet's core API.

ts
import { createWorkbook } from 'cyexcel';

const workbook = createWorkbook(container, {
  newSheetRows: 1000,
  sheets: [
    { name: "Order details", columns, snapshot: orderSnapshot },
    { name: "Regional summary", columns: summaryColumns, snapshot: summarySnapshot }
  ]
});

workbook.getActiveSheet().insertRows(0, 1);
workbook.addSheet("新增 Sheet");
workbook.dispose();