From 9296e0c03f60cde0e9c78c5a6000cec997457a8b Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:48:53 +0800 Subject: [PATCH] 1 --- tool/cfg/tool_cfg_txt.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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')