Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Created Unassigned: ExcelHeaderFooter.ScaleWithDoc property missing in EPPlus 4.1.0 [15502]

$
0
0
The ExcelHeaderFooter.ScaleWithDoc property is missing in EPPlus 4.1.0.
It is implemented in EPPlus 3.

I have implemented this extension method in my code as a workaround:

public static void SetScaleWithDocToFalse(this ExcelWorksheet worksheet)
{
//worksheet.HeaderFooter.ScaleWithDoc = false; //NOTE: This is not implemented in EPPlus 4
var scaleWithDoc = worksheet.WorksheetXml.CreateAttribute("scaleWithDoc");
scaleWithDoc.Value = "0";
var headerFooterAttributes = worksheet.WorksheetXml.GetElementsByTagName("headerFooter")[0].Attributes;
headerFooterAttributes?.Append(scaleWithDoc);
}

Viewing all articles
Browse latest Browse all 2262

Trending Articles



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