Commit 8fa552db authored by Heddi Heryadi's avatar Heddi Heryadi 💪

initial upload

parents
/node_modules
\ No newline at end of file
# am-xlsx2json
Converting xlsx file to json files using nodejs (js-xlsx)
## Install
```
npm install https://repo.aksimaya.id/aksimaya/am-xlsx2json.git
```
## Usage
```javascript
xlsxj = require("am-xlsx2json");
xlsxj({
input: "sample.xlsx",
output: "output.json"
}, function(err, result) {
if(err) {
console.error(err);
}else {
console.log(result);
}
});
```
### Specifying a target sheet
You can optionally provide a sheet name to extract from that sheet
```javascript
xlsxj = require("am-xlsx2json");
xlsxj({
input: "sample.xlsx",
output: "output.json",
sheet: "tags"
}, function(err, result) {
if(err) {
console.error(err);
}else {
console.log(result);
}
});
```
In config object, you have to enter an input path. But If you don't want to output any file you can set to `null`.
## License
\ No newline at end of file
index.js
{
"name": "am-xlsx2json",
"version": "1.0.0",
"description": "just for test",
"main": "index.js",
"scripts": {
"test": "node index.js"
},
"author": "Aksimaya Dev",
"license": "ISC",
"dependencies": {
"csv": "^0.4.6",
"xlsx": "^0.8.0"
},
"devDependencies": {
"mocha": "^2.3.3",
"should": "^7.1.1"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment