var fs = require("fs");
var read_xlsx = require("../read_xlsx");
var excelBuffer = fs.readFileSync("./test.xlsx");
read_xlsx.getWorkbook(excelBuffer).then(function(workbook){
var sheetNames = workbook.getSheetNames();
console.log(sheetNames);
workbook.getSheet("Sheet1").then(function(sheet){
var rowLen = sheet.getRows();
var cellLen = sheet.getColumns();
for(var i=0; i<rowLen; i++) {
for(var k=0; k<cellLen; k++) {
var cell = sheet.getCell(i,k);
if(cell !== null) {
console.log(cell.getName()+":"+cell.getContents())
}
}
}
var a1Sheet = sheet.findCell("A1");
var a1Str = a1Sheet.getContents();
console.log(a1Str)
})["catch"](function(err) {
console.error(err.stack);
});
});