I have different Python list variables(data1, data2, data3 ect) containing data which I want to put into an already existing excel sheet. Presently My loop goes like this.>
You can use the append() method to append values to the existing excel files. Example:
workbook_obj = openpyxl.load_workbook(excelFilePath)
sheet_obj = workbook_obj.active
col1 = 'NewValueCol1'
col2 = 'NewValueCol2'
sheet_obj.append([col1, col2])
workbook_obj.save(excelFilePath)
here the col1 and col2 values will be added with the existing data in the excel sheet.