How To Rename The Sheet Name In The Spread-sheet Using Python?
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, this is creating the spread-s
Solution 1:
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.
Post a Comment for "How To Rename The Sheet Name In The Spread-sheet Using Python?"