Does anybody knows how to create a new xlsx file using openpyxl in python?
filepath = "/home/ubun/Desktop/stocksinfo/yyy.xlsx"
wb = openpyxl.load_workbook(filepath)
ws = wb.get_active_sheet()
What do I need to add?
I'm sorry my head is turning around. :) This solves the problem
filepath = "/home/ubun/Desktop/stocksinfo/test101.xlsx"
wb = openpyxl.Workbook()
wb.save(filepath)
This will create a new file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With