koa-json2xlsx
Json to excel(xlsx) middleware for koa
Need async/await support, so you have to use Node v7.6+, or use --harmony
option.
Installation
Install using npm:
npm install koa-json2xlsx
Usage
const Koa = ;const koaJson2xlsx = ; const app = ;const data = name: 'Peter' age: 18 foo: 'bar' name: 'Jane' age: 19 foo: 'bar' ; app;app;
Reference
xlsx
ctx.xlsx(filename, [option])
You can find available option here.
xls
An alias of xlsx
.
Tests
Run tests using npm test
.