How to read data one by one from excel sheet in node.js

988 views Asked by At

I want to read some URLS from excel sheet and also some json payloads how to do it in node.js?

2

There are 2 answers

0
Yuanfei Zhu On

I am not sure what you mean by "URLS", is it a column in the spreadsheet or do you want to fetch the file from a specific URLs?

Assuming you want to parse the file, node-xlsx should come to help. To fetch a file or request a JSON, please have a look at request.

0
Pranjal Sharma On
var spread_sheet = require('spread_sheet');


var row = "1,2,Jack,Pirate";  // If you want to add row.

var filePath = '/home/Pranjal/Desktop/test.xlsx';

var sheetName = "Sheet1";

var from_row  = 2;

var to_row = 6;

/*
spread_sheet.addRow(row,filePath,sheetName,function(err,result){

console.log(err,result)

})
*/


/*

spread_sheet.getRows(filePath,sheetName,from_row,to_row,function(err,result){

console.log(err,result)

*/