Fix issue with duplicate sheet names in Google Sheets output #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit addresses an issue where the script would crash if a new solution had the same name as a previous one, since the Google Sheets API does not allow multiple sheets with the same name. To resolve this, the code now checks if a sheet with the same name already exists in the spreadsheet, and if so, appends a unique identifier (a timestamp) to the sheet name before creating it. This ensures that each sheet has a unique name and prevents the script from crashing.
Changes include:
write_workplan
function ingsheets.py
to check if a sheet with the same name already exists in the spreadsheet.This change should improve the reliability of the script and prevent crashes due to duplicate sheet names.