
Pythonで
・Excelファイルのシート名を変更
できます!
前提
外部パッケージ「openpyxl」がインストールされていること。
コード
ここでは例として
・デスクトップ配下のファイル「aiueo.xlsx」に
・シート「Sheet1」の名前を「NewSheetName」へ変更
します。

import openpyxl
# Excelファイルパス
excel_file_path = r"C:\Users\lunch\Desktop\aiueo.xlsx"
# 開く
wb = openpyxl.load_workbook(excel_file_path)
# シート名を変更
wb["Sheet1"].title = "NewSheetName"
# 保存
wb.save(excel_file_path)
# 閉じる
wb.close()
print("正常終了しました。")
実行結果
シート名を変更できました。
※シート「Sheet1」の名前を「NewSheetName」へ変更できました。


参考
外部パッケージ「openpyxl」の詳細は、公式サイトをご確認ください。