2012年10月6日 星期六

使用EPPlus 時如何設定頁首頁尾

設定頁首中間文字並指定為標楷體、粗體、大小為16
====
ws.HeaderFooter.EvenHeader.CenteredText = ws.HeaderFooter.OddHeader.CenteredText = "&\"標楷體,Bold\"&16這是頁首中間文字"; 

設定頁尾右邊加入日期、時間、目前頁數、總頁數
====
ws.HeaderFooter.EvenFooter.RightAlignedText = ws.HeaderFooter.OddFooter.RightAlignedText = "{0}  {1}  {2}/{3}".FormatString(ExcelHeaderFooter.CurrentDate,ExcelHeaderFooter.CurrentTime,ExcelHeaderFooter.PageNumber,ExcelHeaderFooter.NumberOfPages);

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...