import pandas as pd import os def update_txt(file) : if (os.path.exists(f"{file}.xlsx")) : df = pd.read_excel(f"{file}.xlsx") df.to_csv(f"{file}.txt", index=False) update_txt("data/CUSTOM_weapon_table") update_txt("data/CUSTOM_armor_table") update_txt("data/CUSTOM_action_resource_points_table") update_txt("data/CUSTOM_spell_table")