nithinmurali / pygsheets

Google Sheets Python API v4
https://pygsheets.readthedocs.io/en/latest
Other
1.51k stars 220 forks source link

Question: Is it possible to rename worksheet? #506

Closed rariyama closed 3 years ago

rariyama commented 3 years ago

Thanks for a great library.

Is your feature request related to a problem? Please describe. I would like to rename the existing sheet. I sometimes need to create a new book which has only one sheet. Also, I need to rename the name of sheet from default. It would be very convenient if I could rename the sheet name by method.

Describe the solution you'd like I would like to rename by writing as follows.

client = pygsheets.authorize(user_auth_credentials)
sp = client.create_spreadsheet(book_name)
sp.sheet1.rename(sheet_name='new_name') # rename is a feature method.

Any other info Since other library has this functions, so it may be possible to implement. https://docs.gspread.org/en/v4.0.1/api.html#gspread.models.Worksheet.update_title If we could help, I would like to support as much as possible.

nithinmurali commented 3 years ago

its possible to rename sheets. You you can just do sp.sheet1.title = "new_name"

see all properties in docs