Commit 1d203b9e by 纪旭 韦

Merge branch 'feature/绩效发放' of http://192.168.18.110:8880/zry/performance into feature/绩效发放

parents 940f8c42 8fbf0bf1
......@@ -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(3, col + 1, dynamics.Count() + 2, 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;
}
......@@ -256,6 +258,10 @@ public string AllComputerDown(sys_hospital hospital, List<dynamic> dynamics, str
worksheet.Cells[2, 1, 2, headList.Count].Style.Font.Bold = true;
worksheet.View.FreezePanes(3, 1);
worksheet.Cells.AutoFitColumns();
for (int col = worksheet.Dimension.Start.Column; col <= worksheet.Dimension.End.Column; col++)
{
worksheet.Column(col).Width = worksheet.Column(col).Width > 20 ? 20 : worksheet.Column(col).Width;
}
#endregion
}
package.Save();
......
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