https://github.com/maifeeulasad/to-spreadsheet
npm to package to create spreadsheet in node environment
https://github.com/maifeeulasad/to-spreadsheet
Last synced: over 1 year ago
JSON representation
npm to package to create spreadsheet in node environment
- Host: GitHub
- URL: https://github.com/maifeeulasad/to-spreadsheet
- Owner: maifeeulasad
- License: mit
- Created: 2022-05-27T09:25:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T07:36:24.000Z (over 2 years ago)
- Last Synced: 2025-02-28T16:41:41.884Z (over 1 year ago)
- Language: TypeScript
- Size: 76.2 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# to-spreadsheet
npm package to create spreadsheet in node environment and in browser
[](https://www.npmjs.com/package/to-spreadsheet)
[](https://badgen.net/bundlephobia/min/to-spreadsheet)
[](https://badgen.net/bundlephobia/minzip/to-spreadsheet)
[](https://github.com/maifeeulasad/to-spreadsheet/stargazers)
[](https://github.com/maifeeulasad/to-spreadsheet/watchers)
[](https://img.shields.io/github/commits-since/maifeeulasad/to-spreadsheet/latest/main?include_prereleases)
# NPM
```
npm i to-spreadsheet
```
# Usage
[](https://codesandbox.io/s/to-spreadsheet-example-hdmrvc?file=/src/App.tsx)
```ts
import { generateExcel , EnvironmentType, skipCell, writeEquation } from 'to-spreadsheet/lib/index';
const sampleData = [
{
title: 'Maifee1', content: [
['meaw', 'grrr'],
['woof', 'smack'],
[1],
[1, 2],
[1, 2, 3, writeEquation('SUM(A5,C5)')],
]
},
{ title: 'Maifee2', content: [[1], [1, skipCell(3), 2]] },
{ title: 'Maifee3', content: [['meaw', undefined, "meaw"], ["woof", 'woof']] }
]
generateExcel(sampleData); // <-- by default generate XLSX for node
generateExcel(sampleData, EnvironmentType.BROWSER); // <-- for browser
```
# Features
- [x] Multiple sheet support
- [x] Equations
- [ ] Cell styling
- [ ] Sheet styling