I have only found how to access the information within the xlsx book but I need the header / footer
I already tried this way.
import * as XLSX from 'xlsx';
const firstSheetName = ws.SheetNames[0];
const worksheet = ws.Sheets[firstSheetName];
const headerCells = XLSX.utils.sheet_to_json(worksheet, { header: 1 })[0];
console.log("headerCells :",headerCells);
There is no option to read headers and footers with XLSX (
headerFootertag insheet.xml).Try with ExcelJS:
docs:
Headers and Footers