How to get Header info or Footer info from XLSX File with Angular

42 views Asked by At

HEADER XLSX

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); 
1

There are 1 answers

0
traynor On

There is no option to read headers and footers with XLSX (headerFooter tag in sheet.xml).

Try with ExcelJS:

worksheet.headerFooter.oddFooter

docs:

Headers and Footers