cycyexcel
中文0.2.0

QUICK START

Quick start

Install the component, convert a two-dimensional array to a snapshot, and create a spreadsheet instance.

Installation

Install the package in an existing frontend project:

shell
pnpm add cyexcel@latest

Create a spreadsheet

createSheet() creates a spreadsheet with a toolbar and formula bar.

Initial data is imported through a WorkbookSnapshot, without a reactive binding to the source array.

ts
import { createSheet } from "cyexcel";
import { matrixToWorkbookSnapshot } from "cyexcel/core";

const rows = [
  ["CY-100001", "Industrial temperature sensor", 128],
  ["CY-100002", "Portable label printer", 465]
];

const sheet = createSheet(document.querySelector("#sheet"), {
  locale: "en-US",
  snapshot: matrixToWorkbookSnapshot(rows),
  headerHeight: 28,
  rowHeaderWidth: 48
});

Spreadsheet with toolbar

Created with createSheet(), including controls for history, formatting, data, and structural operations.