import * as XLSX from 'xlsx'; import * as fs from 'fs'; const buf = fs.readFileSync('data (3).xlsx'); const wb = XLSX.read(buf, {type: 'buffer'}); const ws = wb.Sheets[wb.SheetNames[0]]; const data = XLSX.utils.sheet_to_json(ws, {header: 1}); const headers = data[0]; console.log('Headers:'); headers.forEach((h, i) => { console.log(`${i}: ${h}`); });