using (ExcelPackage package = new ExcelPackage(file))
{
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("###");
worksheet.Cells[iRow, 1].Style.Font.Size = 15;
worksheet.Cells[iRow, 1, iRow, Col].Merge = true;//合并单元格
worksheet.Cells[iRow, 1, iRow,Col].Style.Border.BorderAround(ExcelBorderStyle.Thin, Color.Black);//设置单元格所有边框
worksheet.Row(iRow).CustomHeight = true;//自动调整行高
worksheet.Cells[iRow, 1].Value = Reportsign;
worksheet.Cells[iRow,1].Style.HorizontalAlignment = ExcelHorizontalAlignment.Right;
// ExcelHorizontalAlignment 枚举配置 默认 General = 0,Left = 1,Center = 2,CenterContinuous = 3, Right = 4, Fill = 5, Distributed = 6,Justify = 7
}