bug fixed

This commit is contained in:
kamonwan taengsuk
2022-10-28 12:02:19 +07:00
parent 2758ea46c3
commit 8a5c27d6ae
3 changed files with 8 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ namespace rmutr_report.Controllers
int col = 1;
int row = 3;
int no = 1;
int rowno = 1;
foreach (var kpis in _kpi)
{
if (_kpi != null)
@@ -165,12 +165,14 @@ namespace rmutr_report.Controllers
row++;
}
var data = kpis.header_data.Select(d => d.data).ToList();
foreach (var detail in data)
{
foreach (var data1 in detail)
{
ws.Cell(row, 2).Value = data1.row;
ws.Cell(row, 2).Value = rowno;
ws.Cell(row, 3).Value = data1.name;
ws.Cell(row, 4).Value = data1.unit;
ws.Cell(row, 5).Value = data1.value;
@@ -210,6 +212,7 @@ namespace rmutr_report.Controllers
ws.Cell(row, 8).Style.Border.RightBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 8).Style.Alignment.WrapText = true;
row++;
rowno++;
}
//row++;
}