workbook = xlsxwriter.Workbook('demo1.xlsx')
worksheet = workbook.add_worksheet()
format = workbook.add_format({ 'bg_color': '#5081BB','font_color': '#FFFFFF','font_size': 12,'text_wrap':'true'})
textWrap = workbook.add_format({'text_wrap':'true'})
col = 0
row = 0
for i in data["tabledata"]:
for j in i:
worksheet.write(row, col, j,textWrap)
col = col+1
row = row+1
col = 0
worksheet.set_row(0, 20, format)
worksheet.set_row(1, 20, format)
workbook.close()
this doesn’t work correctly, then why use set_row and set_column? How to apply format for a specific row / column? and also i need to apply date format for date columns.
worksheet.set_column (7, none, Dateformat)?
source
share