0.1.3 • Published 5 years ago
sheet2ids v0.1.3
sheet2ids
Quick Start
In Browser, just import from the aio build.
import { parseFromSheetData } from 'sheet2ids/dist/index.aio';
//...
//Assuming excel file is selected in fileUpload input
var fileUpload = document.getElementById("fileUpload");
var reader = new FileReader();
reader.onload = function (e) {
var parseResult = parseFromSheetData(e.target.result);
//The prefixed ids
console.log(parseResult.ids);
};
reader.readAsBinaryString(fileUpload.files[0]);
Usage Instructions
Using npm, download and install the code.
$ npm install --save sheet2ids
For node environment:
var sheet2ids = require('sheet2ids');
For webpack or similar environment:
import sheet2ids from 'sheet2ids';
For requirejs environment:
requirejs(['node_modules/sheet2ids/dist/index.aio.js'], function (sheet2ids) {
// do something...
})
For browser environment:
<script src="node_modules/sheet2ids/dist/index.aio.js"></script>
Documents
Contribution Guide
For the first time to run, you need to install dependencies firstly.
$ npm install
To build the project:
$ npm run build
To run unit tests:
$ npm test
Note: The browser environment needs to be tested manually under
test/browser
Modify the version number in package.json, modify the version number in README.md, modify the CHANGELOG.md, and then release the new version.
$ npm run release
Publish the new version to NPM.
$ npm publish