I'm following along and running the script to the point you have covered at time marker 8:05. I'm getting "TypeError: Cannot read properties of undefined (reading 'getName')". Can someone help me understand what this means and how to fix it?
The video shows how to create a script to make a table of links to specific sheet in sheets. Very helpful for large groups of sheets. I'd suggest taking it a step further and adding a link to each page or menu item that takes the user back to the index. Also, could you consider adding the index to a dropdown in the menu bar? Good presentation. Thank you.
This is clearly essential for huge sets of worksheets, however, the page link approach can be much faster for navigating small number of pages. for a small number of tabs under, say 15-20 or so it is faster to link to pages or cells directly, but once coded you can reuse the code. And agree it's best to create a link back to your guide or ToC page on each sheet.
Sorry - I know this video is older, but I just tried the script to generate a TOC, and the script is executing just fine in Apps Script and shows me the results I want, but it's not showing up on the Table of Contents tab I created in my Google Sheet workbook. Any suggestions on making it show up there?
@@BootstrappingTools I just ran this as well and it is telling me the same thing. I am the owner of the sheet and I'm logged into the proper account. Any idea why it's saying I need to request access to my own sheet?
function generateTOC() { var ss= SpreadsheetApp.getActiveSpreadsheet(); var sheets = ss.getSheets(); var sheet_names =[] for (i=0; i < sheets.length; i++) { var url = "insert your spreadsheet link here" + sheets[i].getSheetId(); var formula = '=HYPERLINK("' + url + '", "Link to Tab")' sheet_names.push([sheets[i].getName(), formula]) } console.log("sheet_names: ", sheet_names) var toc_sheet = ss.getSheetByName("Contents"); var toc_range = toc_sheet.getRange(1,1, sheet_names.length, sheet_names[0].length) toc_range.setValues(sheet_names) }
I'm following along and running the script to the point you have covered at time marker 8:05. I'm getting "TypeError: Cannot read properties of undefined (reading 'getName')". Can someone help me understand what this means and how to fix it?
Ah, at line five I had
for (i=1 ; 1
Super useful video. Thanks a lot!
Glad it was helpful!
The video shows how to create a script to make a table of links to specific sheet in sheets. Very helpful for large groups of sheets. I'd suggest taking it a step further and adding a link to each page or menu item that takes the user back to the index. Also, could you consider adding the index to a dropdown in the menu bar? Good presentation. Thank you.
Ah yes, so much more we could do to spruce things up a bit more. Maybe this video warrants a part 2... 🤔
Thanks for the suggestion!
@@BootstrappingTools Did you record a part 2 to this one?
This is clearly essential for huge sets of worksheets, however, the page link approach can be much faster for navigating small number of pages. for a small number of tabs under, say 15-20 or so it is faster to link to pages or cells directly, but once coded you can reuse the code.
And agree it's best to create a link back to your guide or ToC page on each sheet.
Sorry - I know this video is older, but I just tried the script to generate a TOC, and the script is executing just fine in Apps Script and shows me the results I want, but it's not showing up on the Table of Contents tab I created in my Google Sheet workbook. Any suggestions on making it show up there?
For some reason, I am getting "Formula parse error" for all tab links... how do I solve that?
Hmm.. the formula might have a typo. Share what you got!
When I did this it asked me for permission and I said yes but now it is saying access denied and I do not have permission to view the info
Do you have edit rights to the google sheet you're trying to use this on?
@@BootstrappingTools I just ran this as well and it is telling me the same thing. I am the owner of the sheet and I'm logged into the proper account. Any idea why it's saying I need to request access to my own sheet?
Script editor isn't under the tools menu?
Try under the "Extensions" option in the menu bar
function generateTOC() {
var ss= SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet_names =[]
for (i=0; i < sheets.length; i++) {
var url = "insert your spreadsheet link here" + sheets[i].getSheetId();
var formula = '=HYPERLINK("' + url + '", "Link to Tab")'
sheet_names.push([sheets[i].getName(), formula])
}
console.log("sheet_names: ", sheet_names)
var toc_sheet = ss.getSheetByName("Contents");
var toc_range = toc_sheet.getRange(1,1, sheet_names.length, sheet_names[0].length)
toc_range.setValues(sheet_names)
}
Hm?
Thank you.
@@BootstrappingTools how was you expecting us to get the code?