diff --git a/tool/cfg/tool_cfg_txt.py b/tool/cfg/tool_cfg_txt.py index e55ce768..db221906 100644 --- a/tool/cfg/tool_cfg_txt.py +++ b/tool/cfg/tool_cfg_txt.py @@ -28,19 +28,18 @@ for file_cfg in file_list: # 将数据写入TXT文件 with open(target_file_path, 'w', encoding='utf-8') as txt_file: - header = [str(cell.value) for cell in sheet[1] if cell.value not in fields_to_remove] txt_file.write('#\t 界面配置表\n') i = 0 for row in sheet.iter_rows(values_only=True): i += 1 - if i < 4 : + if i < 3 : txt_file.write('#\t') else: txt_file.write('\t') if i == 2: txt_file.write('\t'.join(file_cfg["coloum_type"]) + '\n') - continue + txt_file.write('#\t') row_data = [str(cell) for cell in row if cell not in fields_to_remove] txt_file.write('\t'.join(row_data) + '\n')