excel write in row

Solutions on MaxInterview for excel write in row by the best coders in the world

showing results for - "excel write in row"
Simon
01 Oct 2016
1import xlsxwriter
2
3workbook = xlsxwriter.Workbook('write_list.xlsx')
4worksheet = workbook.add_worksheet()
5
6my_list = [1, 2, 3, 4, 5]
7
8for col_num, data in enumerate(my_list):
9    worksheet.write(0, col_num, data)
10
11workbook.close()
12