Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Created Unassigned: Excel header Gettext [9481]

$
0
0
The Excel header Gettext is not returning values in the correct occurrence. I am reading a Excel document and have the same header on all pages. workSheet.PageSetup.Header.GetText(XLHFOccurrence.AllPages) returned empty string. workSheet.PageSetup.Header.GetText(XLHFOccurrence.OddPages) returned the value I have on every page.

code example:
using (XLWorkbook workBook = new XLWorkbook(file))
{
foreach (IXLWorksheet workSheet in workBook.Worksheets)
{
string WorkSheetHeaders = string.Concat(
workSheet.PageSetup.Header.GetText(XLHFOccurrence.AllPages),
workSheet.PageSetup.Header.GetText(XLHFOccurrence.EvenPages),
workSheet.PageSetup.Header.GetText(XLHFOccurrence.FirstPage),
workSheet.PageSetup.Header.GetText(XLHFOccurrence.OddPages));



Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>