private void CopyText(ExcelHeaderFooterText from, ExcelHeaderFooterText to) { if (from == null) { return; } to.LeftAlignedText = from.LeftAlignedText; to.CenteredText = from.CenteredText; to.RightAlignedText = from.RightAlignedText; }
private string GetText(ExcelHeaderFooterText headerFooter) { string ret = ""; if (headerFooter.LeftAlignedText != null) { ret += "&L" + headerFooter.LeftAlignedText; } if (headerFooter.CenteredText != null) { ret += "&C" + headerFooter.CenteredText; } if (headerFooter.RightAlignedText != null) { ret += "&R" + headerFooter.RightAlignedText; } return(ret); }