mirror of
https://github.com/VisActor/VTable
synced 2024-11-22 10:03:28 +00:00
.. | ||
demo | ||
src | ||
.eslintrc.js | ||
bundler.config.js | ||
package.json | ||
README.md | ||
setup-mock.js | ||
tscofig.eslint.json | ||
tsconfig.json |
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.
Usage
Installation
// 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!