修改进度报表导出格式

This commit is contained in:
2023-07-03 10:33:23 +08:00
parent c165519e80
commit 4186d98a14
6 changed files with 25 additions and 5 deletions
@@ -1924,13 +1924,13 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
initTemplatePath = Const.JDreportReportTemplateUrl;
uploadfilepath = rootPath + initTemplatePath;
newUrl = uploadfilepath.Replace(".xlsx", "(" + this.txtMonths.Text.Trim() + ")" + ".xlsx");
newUrl = uploadfilepath.Replace(".xls", "(" + this.txtMonths.Text.Trim() + ")" + ".xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
{
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
}
// 创建单元格样式
@@ -2003,7 +2003,7 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
cell = row.CreateCell(41);
cell.CellStyle = cellStyle1;
cell.SetCellValue("累计计划工作预算费用-BCWS");
rowCount += 1;
for (int i = 0; i < dt.Rows.Count; i++)
{
@@ -3313,7 +3313,8 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
cell.CellStyle = cellStyle;
cell.SetCellValue(cellValue5);
}
else {
else
{
//单位
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;