AttributeError: 'Workbook' object has no attribute 'write' AttributeError: 'Workbook' object has no attribute 'write' flask flask

AttributeError: 'Workbook' object has no attribute 'write'


You can write in worksheet, but not in workbook.

ws = wb.add_worksheet('Data') ws.write(0, 0, 'test')

Full

import xlsxwriterfrom xlsxwriter import Workbookwb = Workbook('C:/Users/vlad.synnes/Desktop/workbook.xlsx')ws = wb.add_worksheet('Data')ws.write(0, 0, 'test')wb.close()

You can see it even in documentation: https://xlsxwriter.readthedocs.io/workbook.html