You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a spreadsheet, Google API does not block when an other Spreadsheet exists with the same name. It will create a second one with the same name.
Possible improvement
Add an option on method create that will first check if a spreadsheet with the name exists before creating a new one.
This could prevent creating a spreadsheet with a name, loosing it's ID then trying to create it again and create a duplicate of the first one.
errors cases
If the spreadsheet already exists 2 possibles solutions to warn the user about it:
raise an exception (SpreadsheetExists) and do not create a new one. This will maintain a unique path for each action, create only create a new non existing file and open only opens existing files.
open and return the spreadsheet with no error.
This will change the behavior of gspread but can be handy for a lot of users.
current behavior
When creating a spreadsheet, Google API does not block when an other Spreadsheet exists with the same name. It will create a second one with the same name.
Possible improvement
Add an option on method
create
that will first check if a spreadsheet with the name exists before creating a new one.This could prevent creating a spreadsheet with a name, loosing it's ID then trying to create it again and create a duplicate of the first one.
errors cases
If the spreadsheet already exists 2 possibles solutions to warn the user about it:
create
only create a new non existing file andopen
only opens existing files.This will change the behavior of gspread but can be handy for a lot of users.
@aiguofer @burnash
What do you think is best?
The text was updated successfully, but these errors were encountered: