This commit is contained in:
@@ -3619,7 +3619,8 @@ namespace rmutr_report.Controllers
|
||||
{
|
||||
var workbook = new XLWorkbook();
|
||||
var ws = workbook.Worksheets.Add("Sheet1");
|
||||
ws.Column(1).Width = 30;
|
||||
//ws.Columns("A").AdjustToContents();
|
||||
ws.Column(1).Width = 40;
|
||||
ws.Column(2).Width = 20;
|
||||
ws.Column(3).Width = 20;
|
||||
ws.Column(4).Width = 20;
|
||||
@@ -3672,24 +3673,27 @@ namespace rmutr_report.Controllers
|
||||
ws.Range("A3:A5").Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Range("A3:A5").Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range("A3:A5").Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(3, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(3, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell(3, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell(3, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(3, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
|
||||
ws.Cell(3, 2).Style.Alignment.WrapText = true;
|
||||
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell(4, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(4, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
|
||||
ws.Cell(5, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(5, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(5, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell(5, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(5, 2).Style.Alignment.WrapText = true;
|
||||
}
|
||||
|
||||
foreach (var detail in requestSummary.data_1)
|
||||
@@ -3716,7 +3720,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
|
||||
foreach (var detail2 in detail.data_2)
|
||||
@@ -3737,6 +3742,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
}
|
||||
if (detail2.color=="2" && detail2.is_bold==null)
|
||||
@@ -3755,6 +3762,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
}
|
||||
if (detail2.color=="3" && detail2.is_bold==null)
|
||||
@@ -3773,6 +3782,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
}
|
||||
if (detail2.color==null && detail2.is_bold==null)
|
||||
@@ -3791,6 +3802,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
}
|
||||
foreach (var detail3 in detail2.data_3)
|
||||
@@ -3811,6 +3824,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
}
|
||||
|
||||
@@ -3839,6 +3854,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Font.FontSize = 10;
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Alignment.WrapText = true;
|
||||
|
||||
ws.Cell(rowhead, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(rowhead, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
@@ -3848,7 +3864,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(rowhead, col).Style.Font.FontSize = 10;
|
||||
ws.Cell(rowhead, col).Style.Alignment.WrapText = true;
|
||||
ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||||
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("A3").Style.Font.FontSize = 10;
|
||||
@@ -3863,7 +3879,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(rowvalue, col).Style.Alignment.WrapText = true;
|
||||
ws.Cell(rowheads, col).Style.Alignment.WrapText = true;
|
||||
col++;
|
||||
}
|
||||
|
||||
@@ -3884,6 +3901,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(204, 153, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
foreach (var budgetPlan in detail.plans)
|
||||
{
|
||||
ws.Cell(row, col2).Value = budgetPlan.value??0;
|
||||
@@ -3894,7 +3913,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, cols).Style.Alignment.WrapText = true;
|
||||
|
||||
col2++;
|
||||
}
|
||||
row++;
|
||||
@@ -3912,6 +3932,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(153, 204, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail2.plans)
|
||||
{
|
||||
@@ -3923,7 +3945,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
}
|
||||
// col2++;
|
||||
@@ -3940,6 +3962,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor =XLColor.FromArgb(255, 204, 153);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail2.plans)
|
||||
{
|
||||
@@ -3951,7 +3974,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
|
||||
}
|
||||
@@ -3969,6 +3992,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 255, 204);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText =true;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail2.plans)
|
||||
{
|
||||
@@ -3980,7 +4004,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
|
||||
}
|
||||
@@ -3999,7 +4023,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail2.plans)
|
||||
{
|
||||
@@ -4009,7 +4033,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Font.FontSize = 10;
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
|
||||
}
|
||||
@@ -4029,6 +4053,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail3.plans)
|
||||
{
|
||||
@@ -4039,7 +4064,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
}
|
||||
// col2++;
|
||||
@@ -4072,7 +4097,8 @@ namespace rmutr_report.Controllers
|
||||
{
|
||||
var workbook = new XLWorkbook();
|
||||
var ws = workbook.Worksheets.Add("Sheet1");
|
||||
ws.Column(1).Width = 30;
|
||||
//ws.Columns("A").AdjustToContents();
|
||||
ws.Column(1).Width = 40;
|
||||
ws.Column(2).Width = 20;
|
||||
ws.Column(3).Width = 20;
|
||||
ws.Column(4).Width = 20;
|
||||
@@ -4116,6 +4142,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(4, 2).Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell(4, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(4, 2).Style.Alignment.WrapText = true;
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||||
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("A3").Style.Font.FontSize = 10;
|
||||
@@ -4127,7 +4154,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(3, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(3, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(3, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
|
||||
ws.Cell(3, 2).Style.Alignment.WrapText = true;
|
||||
ws.Cell(4, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(4, 2).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Cell(4, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
@@ -4139,6 +4166,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(5, 2).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell(5, 2).Style.Font.FontSize = 10;
|
||||
ws.Cell(5, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(5, 2).Style.Alignment.WrapText = true;
|
||||
}
|
||||
|
||||
foreach (var detail in requestSummary.data_1)
|
||||
@@ -4165,6 +4193,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
|
||||
foreach (var detail2 in detail.data_2)
|
||||
@@ -4182,6 +4212,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
|
||||
foreach (var detail3 in detail2.data_3)
|
||||
@@ -4201,6 +4233,8 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 2).Style.Alignment.WrapText = true;
|
||||
row++;
|
||||
|
||||
|
||||
@@ -4229,6 +4263,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Font.FontSize = 10;
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
ws.Range(ws.Cell(rowheads, cols), ws.Cell(rowheads , cols+ countbudgetplan - 1)).Style.Alignment.WrapText = true;
|
||||
|
||||
ws.Cell(rowhead, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(rowhead, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
@@ -4238,7 +4273,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(rowhead, col).Style.Font.FontSize = 10;
|
||||
ws.Cell(rowhead, col).Style.Alignment.WrapText = true;
|
||||
ws.Cell(rowhead, col).Style.Fill.BackgroundColor = XLColor.FromArgb(255, 153, 204);
|
||||
|
||||
ws.Range("A3:A5").Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell("A3").Style.Alignment.WrapText = true;
|
||||
ws.Cell("A3").Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Cell("A3").Style.Font.FontSize = 10;
|
||||
@@ -4253,7 +4288,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(rowvalue, col).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(rowvalue, col).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(rowvalue, col).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(rowvalue, col).Style.Alignment.WrapText = true;
|
||||
col++;
|
||||
}
|
||||
|
||||
@@ -4274,6 +4309,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1), ws.Cell(row, 2)).Style.Fill.BackgroundColor =
|
||||
XLColor.FromArgb(204, 153, 255);
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
foreach (var budgetPlan in detail.plans)
|
||||
{
|
||||
ws.Cell(row, col2).Value = budgetPlan.value??0;
|
||||
@@ -4284,6 +4320,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
}
|
||||
row++;
|
||||
@@ -4297,6 +4334,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.SetBold().Font.FontName = "TH SarabunPSK";
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail2.plans)
|
||||
@@ -4308,7 +4346,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
}
|
||||
|
||||
@@ -4327,6 +4365,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontName = "TH SarabunPSK";
|
||||
ws.Range(ws.Cell(row, 1),ws.Cell(row,2)).Style.Font.FontSize = 10;
|
||||
ws.Cell(row, 1).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
|
||||
ws.Cell(row, 1).Style.Alignment.WrapText = true;
|
||||
col2 = 2;
|
||||
foreach (var budgetPlan in detail3.plans)
|
||||
{
|
||||
@@ -4337,7 +4376,7 @@ namespace rmutr_report.Controllers
|
||||
ws.Cell(row, col2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center;
|
||||
ws.Cell(row, col2).Style.NumberFormat.SetFormat("#,#0");
|
||||
ws.Cell(row, col2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
|
||||
|
||||
ws.Cell(row, col2).Style.Alignment.WrapText = true;
|
||||
col2++;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user