How does Python change the sheet name of an Excel file?

original requirement: the Excel file has been downloaded, but the name of sheet in Excel wants to be changed. For example, the default is that sheet1, needs to be changed to data A.

tried the openpyxl library and prompted to change the sheet name (sheet.title), but opened the modified table and found that the sheet name had not changed. I don"t know whether the logo or something has been changed

has been using xlwt to manipulate Excel.

Mar.10,2022

from openpyxl import load_workbook
filename='D:/.xlsx'
wb=load_workbook(filename)
ws=wb['Sheet1']
ws.title=''-sharpSheet1
wb.save(filename) -sharp
wb.close()
Menu