Have a scenario where I wanted to change the name of the \"Sheet\" in the spread-sheet.
a. I tried created a spread-sheet saying ss = Workbook(). Think,
ss = Workbook()
You can do this by doing the following:
import openpyxl ss=openpyxl.load_workbook("file.xlsx") #printing the sheet names ss_sheet = ss['Sheet'] ss_sheet.title = 'Fruit' ss.save("file.xlsx")
This works for me. Hope this helps.