I have a folder with multiple *.xlsm-files for example "80-384sec -_november_2017.xlsm", "80-384sec -_december_2017.xlsm", ..... I can read a specific sheet from this file with python like this:
df_xlsmtocsv = pd.read_excel('80-384sec -_november_2017.xlsm', 'sheet3, index_col=None )
And my first solution is something like this:
for file in os.listdir():
if file.endswith(".xlsm"):
df_qctocsv = pd.read_excel(file, 'sheet3', index_col=None )
print(df_qctocsv)
with open('all.csv', 'a') as f:
df_qctocsv.to_csv(f, index=True, header=None)
How can I read multiple xlsm-files and append all new messages to a csv-file and order this for example by first column?
After converting I want to copy all this rows from the csv-file to a new sheet in an existing file "messages.xlsx".