TableLibrary

TomHinkle.net

TableLibrary

A convenient library for manipulating tabular data in spreadsheets

Code developed as part of making Workflows Jacknife among other resources. My Table Library makes it easy to access spreadsheet data as a table.

So, for example, if you have a table with some student data with First, Last and Full name headers, but with the Full name not filled in, you could write a simple script like this (this is a silly demo but it shows the beauty of the library):

           var t = Table(SpreadsheetApp.getActiveSpreadsheet().getActiveRange());
           t.forEach(
              function (row) {
                  row.Full = row.Last + ', ' + row.First;
              }
           );
        

That will actually write to the Spreadsheet for you! Couldn't be simpler.


Project id: M9KoYtn45PrVcXNm8gPvlyNjhWfrJiBV7

Tags

Tech used in this project:
Google Apps Script Library JavaScript