I have a Spreadsheet that contains a lot of sheets, and I need to load one of these sheets, how can I do that?
Here is a photo of the sheets in my Spreadsheet
Here is my idea how to do it:
var sheet = SpreadsheetApp.openById(index).getSheetByName('Geração de Demanda');
Should that be working?
On the Window menu, click the workbook that contains the sheet that you want to move. Click the sheet that you want to copy to the other workbook. On the Edit menu, click Sheet > Move or Copy Sheet. On the To book menu, click the workbook that you want to move the sheet to.
On a worksheet, select the cell where you want to create a link. On the Insert tab, select Hyperlink. You can also right-click the cell and then select Hyperlink... on the shortcut menu, or you can press Ctrl+K. Under Display Text:, type the text that you want to use to represent the link.
You're almost there... what you want is to make that sheet 'active' so try this :
var sheet = SpreadsheetApp.getActiveSpreadsheet();
SpreadsheetApp.setActiveSheet(sheet.getSheetByName('Geração de Demanda'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With