コード例 #1
0
 private void SetColumnsWidthForRunReport(ISheetBuilder sb, int columnsCount)
 {
     sb.Column(1, cb => cb.Width(55));
     for (int i = 1; i < columnsCount; i++)
     {
         sb.Column(i + 1, cb => cb.Width(2.5));
     }
 }
コード例 #2
0
 private void GetReportInfo(ISheetBuilder sb, string reportName, Run run, DateTime reportDate)
 {
     sb.Column(1, cb => cb.Width(20))
     .Column(2, cb => cb.Width(35))
     .Block(bb =>
     {
         bb.Add("Report Date").Style(GamePlanReportStyles.HeaderStyle.Name);
         bb.Add(reportDate.ToString(DateTimeFormat)).Style(GamePlanReportStyles.HeaderStyle.Name);
     })
     .Block(bb =>
     {
         bb.Add("Report Name").Style(GamePlanReportStyles.LightHeaderStyle.Name);
         bb.Add(reportName).Style(GamePlanReportStyles.LightHeaderStyle.Name);
     })
     .Block(bb =>
     {
         bb.Add("Run Name").Style(GamePlanReportStyles.LightHeaderStyle.Name);
         bb.Add(run.Description).Style(GamePlanReportStyles.LightHeaderStyle.Name);
     })
     .Block(bb =>
     {
         bb.Add("Run Id").Style(GamePlanReportStyles.LightHeaderStyle.Name);
         bb.Add(run.Id).Style(GamePlanReportStyles.LightHeaderStyle.Name);
     });
     if (run.ExecuteStartedDateTime.HasValue)
     {
         sb.Block(bb =>
         {
             bb.Add("Run Execute Date").Style(GamePlanReportStyles.LightHeaderStyle.Name);
             bb.Add(run.ExecuteStartedDateTime.Value.ToString(DateTimeFormat)).Style(GamePlanReportStyles.LightHeaderStyle.Name);
         });
     }
 }
コード例 #3
0
 public void AutoFit(List <int> columns, ISheetBuilder sheetBuilder) =>
 columns?.ForEach(column => sheetBuilder.Column(column, columnBuilder => columnBuilder.AutoFitColumn()));