Function to Create a Sheet (Tab) within a Spreadsheet via Code
Description:
Implement a function that allows adding new sheets (tabs) within an existing spreadsheet through code, enhancing flexibility in data organization.
Objective:
- Develop a
createSheet function that accepts parameters such as the sheet name and optional properties.
- Integrate the function with the Google Sheets API to add the sheet within the specified spreadsheet.
- Ensure the function validates the existence of the spreadsheet before adding the sheet.
Acceptance Criteria:
- Calling
createSheet('New Tab') adds a new sheet with the specified name to the target spreadsheet.
- Should return an Error in case a tab with that name already exists
- The function returns a confirmation of creation or the ID of the new sheet.
- Documentation and usage examples are included.
- Automated tests validate the creation of sheets.
Function to Create a Sheet (Tab) within a Spreadsheet via Code
Description:
Implement a function that allows adding new sheets (tabs) within an existing spreadsheet through code, enhancing flexibility in data organization.
Objective:
createSheetfunction that accepts parameters such as the sheet name and optional properties.Acceptance Criteria:
createSheet('New Tab')adds a new sheet with the specified name to the target spreadsheet.