Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/air-cc/json-xlsx-simply
translate json to xlsx simply
https://github.com/air-cc/json-xlsx-simply
json-xls nodejs
Last synced: 1 day ago
JSON representation
translate json to xlsx simply
- Host: GitHub
- URL: https://github.com/air-cc/json-xlsx-simply
- Owner: air-cc
- License: mit
- Created: 2017-08-08T06:58:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T08:04:57.000Z (over 7 years ago)
- Last Synced: 2024-08-09T06:39:45.547Z (3 months ago)
- Topics: json-xls, nodejs
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-xlsx-simply
translate json to xlsx simply
# Usage
``` JavaScript
const jsonToXLSX = require('json-xlsx-simply').jsonToXLSX
const filePath = 'demo.xlsx'
const jsonData = [
{name: 'a', age: 1, description: 'a'},
{name: 'b', age: 1, description: 'b'},
{name: 'c', age: 1, description: 'c'},
]
const opts = {
sheetName: 'person', // defalut: sheet
head: ['person-name', 'person-age'], // default: all keys name
fields: ['name', 'age'], // default: all keys value
}jsonToXLSX(filePath, jsonData, opts)
.then(()=> {
// done and you will get a xlsx file in the file path
})
```