fixed format number

This commit is contained in:
kamonwan taengsuk
2023-06-28 10:54:05 +07:00
parent 0ed7123115
commit fcfbb5626f
7 changed files with 44 additions and 43 deletions

View File

@@ -6269,7 +6269,7 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Font.FontName = "TH SarabunPSK";
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Font.FontSize = 14;
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.Font.FontColor = XLColor.Blue;
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(5, 2), ws.Cell(5, 6)).Style.NumberFormat.SetFormat("#,#0");
foreach (var detail in personnel.national_budget_details)
{
@@ -6287,7 +6287,7 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
@@ -6319,7 +6319,7 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Center;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
@@ -6350,7 +6350,7 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;
@@ -6380,7 +6380,7 @@ namespace rmutr_report.Controllers
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.WrapText = true;
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Alignment.Vertical =
XLAlignmentVerticalValues.Center;
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#");
ws.Range(ws.Cell(row, 2), ws.Cell(row, 6)).Style.NumberFormat.SetFormat("#,#0");
ws.Range(ws.Cell(row, 1), ws.Cell(row, 6)).Style.Border.OutsideBorder = XLBorderStyleValues.Thin;
ws.Cell(row, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left;
ws.Cell(row, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Right;