Programmatically Generate a Google Sheets Table of Contents

Welcome to Community Support - where you can get help with hurdles you're facing while bootstrapping your company or trying to find new ways to increase your efficiency and up your game at work.
In this video, we'll show you how to programmatically generate a Table of Contents using Google Apps Script. We'll go over how to set up your script to access your Google Sheet, get all of the sheet names available, turn them into hyperlinks so that you can click through to the individual tabs, and how to write that into your Google Sheet, and also how to trigger it as a Macro command.
🎉Are you interested in a Bootstrapping Tools Community? Let me know! forms.gle/4tzvffHiRqS7pVZY6 🎉
0:00 - Intro
0:47 - Topic
3:30 - Creating our generateTOC function
7:41 - Setting up our sheet_names data
8:12 - Writing to our Google Sheet
12:20 - Creating Hyperlinks to each tab
16:14 - Turning generateTOC into a Macro
17:26 - Wrap up
We've got plenty of other videos where we build cool things together - check them out here: • Let's Build Together!
🔔 Subscribe for more tips just like this: kzread.info...
======= KEEP LEARNING WITH Bootstrapping Tools =======
🎬 MOST RECENT VIDEOS: / bootstrappingtools
🤖 Automate with Google Apps Script: bit.ly/BootstrappingTools-Goo...
💻 Build-Through Videos: bit.ly/BootstrappingTools-Let...
🚑 Community Support Videos: bit.ly/BootstrappingTools-Com...
🚀 Check out some of our written content: bootstrapping.tools
======================================================
👥 Looking for something specific? feedback@bootstrapping.tools
======================================================
💝 Support our channel 💝
Buy us a coffee: ko-fi.com/bootstrappingtools
Or by tipping: koji.to/k/6wBv
======================================================
#Bootstrapped #GoogleSheets #GoogleAppsScript

Пікірлер: 15

  • @Twogemsconsulting
    @Twogemsconsulting2 ай бұрын

    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.

  • @omargarcia2806
    @omargarcia28062 ай бұрын

    Super useful video. Thanks a lot!

  • @BootstrappingTools

    @BootstrappingTools

    Ай бұрын

    Glad it was helpful!

  • @0000000demo
    @0000000demo Жыл бұрын

    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.

  • @BootstrappingTools

    @BootstrappingTools

    Жыл бұрын

    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!

  • @SteBor-bb1st

    @SteBor-bb1st

    4 ай бұрын

    @@BootstrappingTools Did you record a part 2 to this one?

  • @elseab9777
    @elseab97778 ай бұрын

    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?

  • @user-uc2ig1wh3h
    @user-uc2ig1wh3h6 ай бұрын

    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

  • @BootstrappingTools

    @BootstrappingTools

    5 ай бұрын

    Do you have edit rights to the google sheet you're trying to use this on?

  • @42Pandas
    @42Pandas Жыл бұрын

    Script editor isn't under the tools menu?

  • @BootstrappingTools

    @BootstrappingTools

    Жыл бұрын

    Try under the "Extensions" option in the menu bar

  • @42Pandas
    @42Pandas Жыл бұрын

    function generateTOC() { var ss= SpreadsheetApp.getActiveSpreadsheet(); var sheets = ss.getSheets(); var sheet_names =[] for (i=0; 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) }

  • @BootstrappingTools

    @BootstrappingTools

    Жыл бұрын

    Hm?

  • @omargarcia2806

    @omargarcia2806

    2 ай бұрын

    Thank you.

  • @BombasticVirus

    @BombasticVirus

    Ай бұрын

    @@BootstrappingTools how was you expecting us to get the code?