0
0
Google Sheetsspreadsheet~10 mins

Creating and opening spreadsheets in Google Sheets - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new Google Sheet with a given title.

Google Sheets
var spreadsheet = SpreadsheetApp.[1]('My New Sheet');
Drag options to blanks, or click blank then click option'
Acreate
BopenById
CgetActiveSpreadsheet
DopenByUrl
Attempts:
3 left
💡 Hint
Common Mistakes
Using openById or openByUrl instead of create.
Trying to use getActiveSpreadsheet to create a new sheet.
2fill in blank
medium

Complete the code to open an existing spreadsheet by its ID.

Google Sheets
var spreadsheet = SpreadsheetApp.[1]('1a2b3c4d5e6f7g8h9i0j');
Drag options to blanks, or click blank then click option'
AopenByUrl
BopenById
CgetActiveSpreadsheet
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using create instead of openById.
Using openByUrl when only the ID is given.
3fill in blank
hard

Fix the error in the code to open a spreadsheet by URL.

Google Sheets
var spreadsheet = SpreadsheetApp.[1]('https://docs.google.com/spreadsheets/d/abc123xyz/edit');
Drag options to blanks, or click blank then click option'
AopenById
Bcreate
CopenByUrl
DgetActiveSpreadsheet
Attempts:
3 left
💡 Hint
Common Mistakes
Using openById with a full URL string.
Using create instead of openByUrl.
4fill in blank
hard

Fill both blanks to get the active spreadsheet and then get its first sheet.

Google Sheets
var spreadsheet = SpreadsheetApp.[1]();
var sheet = spreadsheet.[2]()[0];
Drag options to blanks, or click blank then click option'
AgetActiveSpreadsheet
BgetSheetByName
CgetSheets
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using create instead of getActiveSpreadsheet.
Using getSheetByName with an index number.
5fill in blank
hard

Fill all three blanks to create a new spreadsheet, get its first sheet, and rename it.

Google Sheets
var spreadsheet = SpreadsheetApp.[1]('Budget 2024');
var sheet = spreadsheet.[2]()[0];
sheet.[3]('January');
Drag options to blanks, or click blank then click option'
Acreate
BgetSheets
CsetName
DopenById
Attempts:
3 left
💡 Hint
Common Mistakes
Using openById instead of create.
Trying to rename the spreadsheet instead of the sheet.