Introduction to specifying the range used in Office scripts.
Operations
The following syntax is used (Red text indicates variable parts)
workbook.getWorksheet("Worksheet Name").getUsedRange()
This example calls the select() method, which selects cells in the range being used.