from openpyxl import load_workbook
wb = load_workbook("C:\op.xlsx")
ws = wb.active
This is the code I have so far as I don't know what to do next so pls help me.
from openpyxl import load_workbook
wb = load_workbook("C:\op.xlsx")
ws = wb.active
This is the code I have so far as I don't know what to do next so pls help me.
Try:
ws.delete_rows(1, ws.max_row)
You could also delete the sheet and create another one:
del wb[wb.active.title]
wb.create_sheet()
See