20240428 综合管理导出

This commit is contained in:
2024-04-28 10:23:34 +08:00
parent 34b758f841
commit ca070d56cf
29 changed files with 1208 additions and 125 deletions
@@ -418,13 +418,14 @@ namespace FineUIPro.Web.CQMS.Check
var lists = BLL.JointCheckService.GetDriverPlanByProjectId(this.CurrUser.LoginProjectId);
if (lists != null)
{
newUrl = uploadfilepath.Replace("质量专项检查模版.xlsx", "质量专项检查.xlsx");
newUrl = uploadfilepath.Replace("质量专项检查模版.xls", "质量专项检查.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.XSSF.UserModel.XSSFWorkbook(stream);
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
}
// 创建单元格样式
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();