[FE API] 修改歷史資料匯出報表 每個工作表第一行都有標頭

This commit is contained in:
keke 2023-09-13 00:13:45 +08:00
parent e6ff5dd1df
commit 22428432f8

View File

@ -262,6 +262,7 @@ namespace FrontendWebApi.ApiControllers
} }
if (d.type != lastDeviceItem) if (d.type != lastDeviceItem)
{ {
RowPosition = 0;
lastDeviceItem = d.type; lastDeviceItem = d.type;
sheet = workbook.CreateSheet($"{building.Where(x => x.building_tag == lhe.device_number.Split("_")[1]).Select(x => x.full_name).FirstOrDefault()}{"_" + d.type}"); sheet = workbook.CreateSheet($"{building.Where(x => x.building_tag == lhe.device_number.Split("_")[1]).Select(x => x.full_name).FirstOrDefault()}{"_" + d.type}");
#region set cell #region set cell
@ -282,7 +283,7 @@ namespace FrontendWebApi.ApiControllers
cell.SetCellValue("記錄時間"); cell.SetCellValue("記錄時間");
cell.CellStyle = styleLine12; cell.CellStyle = styleLine12;
#endregion #endregion
RowPosition = 0; RowPosition = 1;
} }
else { else {
RowPosition += 1; RowPosition += 1;