weshedrick
weshedrick

Reputation: 163

openByUrl() does nothing

Brand new at this.

I thought the following code in Google Apps Script would simply open a sheet in another window. But nothing happened. Nothing.

Here's my code:

function OpenaSheet() {
  SpreadsheetApp.openByUrl('https://docs---------Blanked out on purpose-------------')

}

Upvotes: 0

Views: 897

Answers (1)

ReyAnthonyRenacia
ReyAnthonyRenacia

Reputation: 17613

The SpreadsheetApp openByUrl(url) was meant to access your google spreadsheet as shown in the docs.

Another way to access your gsheet is by openById. So openByUrl doesn't literally mean it will open a provided Url but instead a means to access the spreadsheet. Check this SO post for that purpose.

Upvotes: 1

Related Questions