合计BUG修复

parent a8f6ea6d
......@@ -233,7 +233,7 @@ public string AllComputerDown(sys_hospital hospital, List<dynamic> dynamics, str
if (col == 0)
worksheet.SetValue(dynamics.Count() + 2, col + 1, "合计");
else if (!notSum.Contains(headList[col].Name.ToLower()))
worksheet.Cells[dynamics.Count() + 2, col + 1].Formula = string.Format("SUM({0})", new ExcelAddress(2, col + 1, dynamics.Count() + 1, col + 1).Address);
worksheet.Cells[dynamics.Count() + 3, col + 1].Formula = string.Format("SUM({0})", new ExcelAddress(2, col + 1, dynamics.Count() + 1, col + 1).Address);
}
#region 样式设置
......@@ -242,7 +242,9 @@ public string AllComputerDown(sys_hospital hospital, List<dynamic> dynamics, str
worksheet.Row(row).Height = 20;
for (int col = worksheet.Dimension.Start.Column; col <= worksheet.Dimension.End.Column; col++)
{
if (!notSum.Contains(headList[col].Name.ToLower()))
worksheet.Cells[row, col].Style.Numberformat.Format = "#,##0.00";
worksheet.Cells[row, col].Style.Border.BorderAround(ExcelBorderStyle.Thin);
worksheet.Cells[row, col].Style.VerticalAlignment = ExcelVerticalAlignment.Center;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment