Код: Выделить всё
file = filedialog.asksaveasfile(mode='w', defaultextension=".xlsx")
data.to_excel(file)
Код: Выделить всё
stat: path should be string, bytes, os.PathLike or integer, not _io.TextIOWrapper
Подробнее здесь: https://stackoverflow.com/questions/693 ... -in-python