0.0.2 • Published 6 years ago

knex-seed-xlsx v0.0.2

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

knex-seed-xlsx

Knex seed from xlsx file

Basic usage

const seedXlsx = require('knex-seed-xlsx');

exports.seed = seedXlsx('master-data.xlsx', ['table1', 'table2', 'table3']);

Notes

  • Sheet names in xlsx file and the table names should be same
  • First row of each sheet should be column names
+----+-----------+-------+
| id | name      | price |
+----+-----------+-------+
| 1  | Product A | 1000  |
+----+-----------+-------+
| 2  | Product B | 2000  |
+----+-----------+-------+
| 3  | Product C | 3000  |
+----+-----------+-------+
0.0.2

6 years ago

0.0.1

6 years ago