/// <summary> /// Generate header table score. /// </summary> /// <param name="workbook">The npoi workbook interface.</param> /// <param name="sheet1">The npoi sheet interface.</param> /// <param name="rowIndex">The row target index.</param> /// <param name="summary">The evaluation summary.</param> private void GenerateScoreHeader(IWorkbook workbook, ISheet sheet1, ref int rowIndex, SummaryEvaluationViewModel summary) { this.GenerateSubHeaderTable(workbook, sheet1, ref rowIndex); IRow subContentRow = sheet1.CreateRow(rowIndex); int cellSubContentIndex = 3; string[] subContent = new string[] { "คะแนนรวม", summary.Total.ToString(), "100", summary.GradeName, "" }; sheet1.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 6, 7)); foreach (var content in subContent) { ExcelService.CreateContentCell(workbook, sheet1, subContentRow, cellSubContentIndex, content); cellSubContentIndex++; } rowIndex += 1; IRow topicUserContent = sheet1.CreateRow(rowIndex); ExcelService.CreateContentCellNoBorder(workbook, sheet1, topicUserContent, 1, "คะแนนผู้ประเมิน"); sheet1.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 1, 2)); rowIndex += 1; }