Hi,
I have encountered a bug in EPPLUS HeaderFooter.
I wanted to add in a header to a template sheet which already have a footer, my code can be compiled just fine. But the resulted workbook will not be able to open as it gets corrupted.
I found a get around:
Whenever you want to add a header, first capture the existing header and footer, then remove all the childnodes of <headerFooter> in WorksheetXML. Finally, set the new value for header and the original footer.
Once again, thanks EPPlus team for your great works!
Comments: In this case the header footer elements were saved in the wrong order. I have applied a fix in the latest source (default branch)
I have encountered a bug in EPPLUS HeaderFooter.
I wanted to add in a header to a template sheet which already have a footer, my code can be compiled just fine. But the resulted workbook will not be able to open as it gets corrupted.
I found a get around:
Whenever you want to add a header, first capture the existing header and footer, then remove all the childnodes of <headerFooter> in WorksheetXML. Finally, set the new value for header and the original footer.
Once again, thanks EPPlus team for your great works!
Comments: In this case the header footer elements were saved in the wrong order. I have applied a fix in the latest source (default branch)