[BUG] most headerFooter options get ignored
See original GitHub issueš Bug Report
headerFooter is supposed to have the following options: firstHeader firstFooter oddFooter evenFooter oddHeader evenHeader
Only oddHeader and oddFooter partially work. oddHeader sets text in middle header for all pages. oddFooter sets text in middle footer on all pages.
Lib version: 4.0.1
Steps To Reproduce
See JS code below. Save to xlsx file and open with Excel 20019
const workbook = new Excel.Workbook();
var worksheet = workbook.addWorksheet("first", {
views: [{ showGridLines: false }],
});
worksheet.headerFooter = {
firstHeader: "Hello Exceljs",
firstFooter: "Hello World",
oddFooter: "Page &P of &N",
evenFooter: "even footer",
oddHeader: "oddHeader",
evenHeader: "evenHeader",
};
await workbook.xlsx.writeFile("./test1.xlsx");
The expected behaviour:
Setting
firstHeader
firstFooter
evenFooter
evenHeader
should make some difference (ie header/footer text displayed on first and even pages)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:19
- Comments:9
Top Results From Across the Web
"Cannot parse header or footer so it will be ignored" on ...
It's not an error, it's a warning. It's telling you that openpyxl lacks support for some of the features of the file you...
Read more >WordPress 5.9 header/footer and/or Body not working together.
I started getting different error messages about things being incompatible and tried variations. I could get the pages to display, but theĀ ...
Read more >header footer - fancyhdr package not working - TeX
So I'm using the fancyhdr package and compiling my code and it gives me no error whatsoever butĀ ...
Read more >PM30890: RPE: Stylesheet ignored Same as Previous settings - IBM
Closed as program error. Error description ... matter with header/footer defined -insert a next page section break -on the 3rd page, set the...
Read more >33304 ā Header / Footer should be inserted into margin, not ...
The ability to put the header/footer in the margin would save me this ... top margin to 1 cm, then add a header,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi everyone
Iām trying to add a header and footer to a worksheet but it doesnāt work. Someone else finds how to solve this or how to add the header and footer to a worksheet? Iām using the next options object
Iām the package version 4.2.1. I try to follow this example but in my case does not work. #https://github.com/exceljs/exceljs/issues/1413
Thanks!
Few Details: I notice āHeader & Footerā is a new feature - Updating to version 4.1.0 - showed the oddHeader. firstHeader & firstFooter does not work.
Also in order to see the header you have to do the following in excel: View --> āPage Layoutā (You cannot see header in āNormalā Layout)