Skip to content

Instantly share code, notes, and snippets.

@pstoll
Last active May 1, 2022 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pstoll/49c339583e51ca4fda46675d92c2d5cc to your computer and use it in GitHub Desktop.
Save pstoll/49c339583e51ca4fda46675d92c2d5cc to your computer and use it in GitHub Desktop.
GoogleSheet Group Category Reports Macros
/** @OnlyCurrentDoc */
/** If you use Tiller & Category Rollup reports, this macro will create the groups to hide/collapse each level of report
* code from https://stackoverflow.com/questions/67784454/group-and-collapse-rows-in-google-apps-script
* relevant docs:
* https://community.tillerhq.com/t/docs-category-rollup-report/121
* https://spreadsheet.dev/reading-from-writing-to-range-in-google-sheets-using-apps-script
*
*/
function GroupSelectedColumn() {
groupRowsInCatRollUpReport()
return;
}
… : sheet.getDataRange()
).getDisplayValues();
let row = values.length - 1;
while (row && !values[row].join('')) row--;
return row + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment