[]
Gets or sets whether the header and footer are aligned with the margins set in the page setup options.
When this property is true, the header and footer use the page margins
defined in the current IPageSetup settings for alignment when the worksheet is printed.
bool AlignMarginsHeaderFooter { get; set; }
Property AlignMarginsHeaderFooter As Boolean
IPageSetup pageSetup = worksheet.PageSetup;
pageSetup.AlignMarginsHeaderFooter = true;
bool alignMarginsHeaderFooter = pageSetup.AlignMarginsHeaderFooter;