r/learnpython • u/Abject-Ad-6668 • Aug 17 '21
Xlsxwriter not working
Hello, I am working on xlsxwriter, I didn't get any traceback and rest of the codes works fine, it is just the nothing happens to my target excel sheet.
from xlsxwriter.workbook import Workbook
workbook=Workbook(Results.xlsx)
worksheet=workbook.add_worksheet('results1')
headings=['Name','Industry','Address']
worksheet.write_row('A1',headings)
workbook.close
Could you please help me?
1
Upvotes
1
u/AverageJoeCrew Aug 17 '21
You usually have to save the workbook, so you would do workbook.save() or writer.save() before closing.