Skip to main content

Named Ranges

Named ranges are a feature of spreadsheets that allow you to name one or a range of cells so they can be easily referenced later on. Named ranges are one of the ways Sheetloom hooks into your template and knows where to place your data. In order to know this, the range name must match the Pattern and Stitch name it references in Sheetloom and be structured according to the dot notation detailed in the following section.

Dot Notation

Sheetloom uses a dot notation to reference Stitches within their Patterns, similar to the schema.table style found in most SQL queries. When placing a Stitch reference anywhere in your sheet, you must specify it as pattern.stitch.

Creating a Named Range

Microsoft Excel

In Microsoft Excel this can be done one of two ways:

  • In the ribbon bar, click on Formulas then click on Name Manager. From here, click on New... to add a new named range to your sheet.
  • Highlight the cells you want to name. To the left of the formula bar, type the name of the named range and press enter.
tip

Sheetloom does not need the named range to match the size of the result set. The upper-left most cell of the named range is where it will place your results, and they will fill as many rows and columns as they need from there. Because of this, it is useful to know in advance how wide/long your data will be, especially if you're blending multiple Stitches onto the same sheet.

tip

Named Range replacement works slightly differently to tab replacement. Named Range replacement will preserve any formatting in the cells it replaces, but it is slower to generate than a tab replacement.

Example

In this example a named range has been defined in the top corner of this sheet, with the Pattern cool_cargo_pattern and the name office_list.

empty named range

In a database tool such as DBeaver, the office_list query is crafted and added into the Pattern Manager.

example query

Once saved and run through Sheetloom, the named range has been populated with the data from the SQL query.

filled named range