VTable/packages/vtable-export
2024-10-16 04:34:01 +00:00
..
demo fix: fix group cell in vtable-export #2487 2024-09-27 18:00:48 +08:00
src fix: fix group cell in vtable-export #2487 2024-09-27 18:00:48 +08:00
.eslintrc.js fix vscode editor tip error for windows 2024-03-13 17:20:06 +08:00
bundler.config.js fix: fix umd build error in vtable-export 2023-12-25 15:38:19 +08:00
package.json build: prelease version 1.9.2-alpha.1 2024-10-16 04:34:01 +00:00
README.md feat: add table export demo 2023-12-15 18:48:47 +08:00
setup-mock.js feat: add csv export tool 2023-12-11 16:33:42 +08:00
tscofig.eslint.json feat: add csv export tool 2023-12-11 16:33:42 +08:00
tsconfig.json feat: add csv export tool 2023-12-11 16:33:42 +08:00

VTable-Export

VTable is not just a high-performance multidimensional data analysis table, but also a grid artist that creates art between rows and columns.React-VTable is a React wrapper of VTable.

npm Version npm Download license

Usage

Installation

npm package

// npm
npm install @visactor/vtable-export

// yarn
yarn add @visactor/vtable-export

Quick Start

import * as VTable from '@visactor/vtable';
import { downloadCsv, exportVTableToCsv, downloadExcel, exportVTableToExcel } from '@visactor/vtable-export';

const option = {
  header: [
    {
      field: "0",
      caption: "name",
    },
    {
      field: "1",
      caption: "age",
    },
    {
      field: "2",
      caption: "gender",
    },
    {
      field: "3",
      caption: "hobby",
    },
  ],
  records: new Array(1000).fill(["John", 18, "male", "🏀"]),
};

const tableInstance = new VTable.ListTable(option);

// donload csv file
downloadCsv(exportVTableToCsv(tableInstance), 'export-csv');

// donload excel file
downloadExcel(await exportVTableToExcel(tableInstance), 'export-excel');

More demos and detailed tutorials

Related Links

Ecosystem

Project Description
AI-generated Components AI-generated table component.

Contribution

If you would like to contribute, please read the Code of Conduct Guide first。

Small streams converge to make great rivers and seas!

License

MIT License