Explorar el Código

过滤掉无效的项目

Signed-off-by: binren <zhangbr@elab-plus.com>
binren hace 4 años
padre
commit
0ef03caa14
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      report_file_utils.py

+ 2 - 1
report_file_utils.py

@@ -170,7 +170,8 @@ class ReportFileUtils:
 
             # 写入数据
             start_row = 1
-            self.insert_cells(ws, d, start_row, 0, len(d[0]))
+            if len(d) == len(headers[index]):
+                self.insert_cells(ws, d, start_row, 0, len(d[0]))
         self.wb.save(file_path)