0.1.1 • Published 6 years ago

egg-xlsx v0.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

egg-xlsx

NPM version build status Test coverage David deps Known Vulnerabilities npm download

read the excel file content plugin for egg framework, based on js-xlsx

Install

$ npm i egg-xlsx --save

Usage

// {app_root}/config/plugin.js
exports.xlsx = {
  enable: true,
  package: 'egg-xlsx',
};

Configuration

// {app_root}/config/config.default.js
exports.xlsx = {
};

see config/config.default.js for more detail.

Example

Upload the xlsx file and get the content

// {app_root}/app/controller/xlsx.js
const Contrller = require('egg').Controller

class XlsxController extends Contrller {
  async index() {
    const {ctx, app} = this
    const res = await app.xlsx.analysis(ctx)
    ctx.body = res
  }
}
module.exports = XlsxController

More function

Questions & Suggestions

Please open an issue here.

License

MIT

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago