- # Rename each copied sheet to match original name
- rename_sheet(turb, spreadsheet_id, res['sheetId'],
- sheet["properties"]["title"])
+ # Rename each copied sheet to match the name from the template
+ sheet_name = sheet["properties"]["title"]
+ # Except for "Text" which we rename to the puzzle name
+ if sheet_name == "Text":
+ sheet_name = puzzle['name']
+ rename_sheet(turb, spreadsheet_id, res['sheetId'], sheet_name)