Fix add file exect
This commit is contained in:
parent
a70f7aed34
commit
74a5e57f15
Binary file not shown.
@ -25,7 +25,8 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/CUBETIQ/data-migration-nodejs#readme",
|
"homepage": "https://github.com/CUBETIQ/data-migration-nodejs#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"xlsx": "^0.16.9",
|
"jest": "^26.6.3",
|
||||||
"jest": "^26.6.3"
|
"read-excel-file": "^5.0.0",
|
||||||
|
"xlsx": "^0.16.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,6 @@
|
|||||||
|
|
||||||
var XLSX = require('xlsx')
|
var XLSX = require('xlsx')
|
||||||
var workbook = XLSX.readFile('./data/Sanagro Product and Catagory list.xlsx');
|
var workbook = XLSX.readFile('./data/Sanagro Product and Catagory list.xlsx');
|
||||||
var xlData = XLSX.utils.sheet_to_json(workbook.Sheets['Sheet2']);
|
var xlData = XLSX.utils.sheet_to_json(workbook.Sheets['Sheet1']);
|
||||||
console.log(xlData);
|
var data = xlData.map((row) => ({ id: row.No, name: row['Product name'] }))
|
||||||
|
console.log(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user