Apr-27-2020, 10:04 AM
I am trying to write new data to excel, however, this code erases the old one.
Is there a way to slightly modify this code without erasing the old data ?
Is there a way to slightly modify this code without erasing the old data ?
import xlwt wb = xlwt.Workbook() ws = wb.add_sheet('Sheet 1') listdata = ['write', 'list', 'to', 'excel', 'row'] first_row = 0 # write each item in the list to consecutive columns on the first row for index, item in enumerate(listdata): ws.write(first_row, index, item) wb.save('example.xls')