openpyxl write excel code example
Example 1: openpyxl write in cell
import openpyxl
wb = load_workbook(filename='xxxx.xlsx')
ws = wb.worksheets[0]
ws['A1'] = 1
ws.cell(row=2, column=2).value = 2
ws.cell(coordinate="C3").value = 3 # 'coordinate=' is optional here
Example 2: writing to an excel file using openpyxl module
Python | Writing to an excel file using openpyxl module ...www.geeksforgeeks.org › python-writing-excel-file-using...