diff --git a/FrontendWebApi/ApiControllers/HistoryController.cs b/FrontendWebApi/ApiControllers/HistoryController.cs index b45c3b4..bfbb052 100644 --- a/FrontendWebApi/ApiControllers/HistoryController.cs +++ b/FrontendWebApi/ApiControllers/HistoryController.cs @@ -262,6 +262,7 @@ namespace FrontendWebApi.ApiControllers } if (d.type != lastDeviceItem) { + RowPosition = 0; 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}"); #region set cell @@ -282,7 +283,7 @@ namespace FrontendWebApi.ApiControllers cell.SetCellValue("記錄時間"); cell.CellStyle = styleLine12; #endregion - RowPosition = 0; + RowPosition = 1; } else { RowPosition += 1;