I am using exceljs to fetch data from excel. I have written the below code. I am able to get the values inside the rows. But, I am not understanding how to get the column names.
let workbook = new ExcelJs.Workbook();
workbook.xlsx.load(edata).then(async function(wb){
wb.eachSheet((sheet, id) => {
sheet.eachRow({ includeEmpty: false }, function(row, rowIndex) {
console.log(row.values)
})
})
})
Please help me in fetching the column names. Thanks in advance!!