Skip to main content

Use XBRL Range Variables for Tagging

Using a ##XS and ##XE range variable combination allows you to define an area and tag a text block within part of a ##RS and ##RE range variable combination or inside a print area. If you want to tag the entire area defined by a ##RS-##RE range, you tag the ##RS cell. If you want to tag only a part of the area, you tag the ##XS cell.

A ##XS and ##XE range variable combination:

  • is typically used when an area is to be tagged partially or as a whole.
  • can be used with a ##RS and ##RE range variable combination or within a print area.
  • can only be used in conjunction with either a ##RS-##RE range or print area. The combination cannot be used on its own.

Note: When a ##RS and ##RE range variable combination and a print area both exist in an Excel report object, only the ##RS and ##RE combination is used. The print area is ignored.

Row and Column Suppression

Row and column suppression is applicable when using a ##RS and ##RE range variable combination or a print area.

Example: Column D and row 4 are marked for suppression inside of the printed area bounded by C3:E8.

You select cell B3 to create the text block tag or footnote, and HTML content is returned for cell range C3:E8, without the content from column D or row 4.

Use a ##RS and ##RE Variable Combination with ##XS and ##XE

The content of the ##RS-##RE range is between cells {##RS cell row +1, ##RS cell column +1} and {##RE cell row -1, ##RE cell column -1}, whereas the ##XS-##XE range is between cells {##XS cell row, ##XS cell column +1} and {##XE cell row, ##XE cell column -1}.

Example: The ##RS variable is in cell B2 and ##RE is in cell E6. Therefore, the range defined by the ##RS and ##RE combination is C3:D5.

Example: For a ##XS and ##XE range variable combination, the ##XS variable is in cell B4 and ##XE in cell E5. Therefore, the range defined by the ##XS and ##XE combination is C4:D5.

Tag Scenarios Using ##XS and ##XE in a Print Area

Scenario 1: A ##XS-##XE range takes up one of the entire cell ranges of the print area, including when the print area consists of only one cell range in total.

The print area is defined to have only one cell range C3:E8. The range defined by the ##XS and ##XE combination is also C3:E8.

You select cell B3 to create the text block tag or footnote, and HTML content is returned for cell range C3:E8.

The print area is defined to have two cell ranges: C3:D4 and C6:D7, and the range defined by the ##XS and ##XE combination is C3:D4.

You select cell B3 to create the text block tag or footnote, and HTML content is returned for cell range C3:E4.

Scenario 2: A ##XS-##XE range takes up only a portion of an entire cell range of the print area, including when the print area consists of only one cell range in total.

The print area is defined to have only one cell range C3:E8, and the range defined by the ##XS and ##XE combination is C3:E6.

You select cell B3 to create the text block tag or footnote, and HTML content is returned for cell range C3:E6.

The print area is defined to have two cell ranges: C2:D4 and C6:D8, and the range defined by the ##XS and ##XE combination is C2:D4.

You select cell B2 to create the text block tag or footnote, and HTML content is returned for cell range C2:D3.

Scenario 3: Multiple ##XS-##XE ranges are in the same cell range of a print area.

One of the cell ranges in the print area is C2:D8, and three different ##XS-##XE ranges can be found: C2:D3, C4:D5, and C6:D8.

You select cell B4 to create the text block tag or footnote, and HTML content is returned for cell range C4:D5.

Default Sort Order of Text Block Tags in a Print Area

As it is possible to have more than one region in the print area in a sheet (as opposed to having only one ##RS and ##RE combination per sheet), there is a default sort order of text block tags when using the ##XS and ##XE combination in a print area. Here is the rule:

The print area is defined as C3:D4, F2:G3, B6:C7. Three text block tags were created on cell B3, E2, and A6.

The default sort order, based on top-to-bottom, then left-to-right, is E2, B3, A6

Invalid ##XS and ##XE Variable Range Combination Use

Example 1: You attempt to create a text block tag or footnote on cell B2. An error occurs because the placement of the ##XS variable is in a row outside of the cell range of a printed area.

Example 2: You attempt to create a text block tag or footnote on cell A3. An error occurs because the placement of the ##XS variable is in a column outside of the cell range of a printed area.

Example 3: You attempt to create a text block tag or footnote on cell C3. An error occurs because the placement of the ##XS variable is inside the cell range of the print area.

Example 4: You attempt to create a text block tag or footnote on cell B3. An error occurs because the placement of the ##XE variable is in a row outside of the cell range of the print area.

Example 5: You attempt to create a text block tag or footnote on cell B3. An error occurs because the placement of the ##XE variable is in a column outside of the cell range of the print area.

Example 6: You attempt to create a text block tag or footnote on cell B3. An error occurs because the placement of the ##XE variable is inside the cell range of the print area.

Example 7: You attempt to create a text block tag or footnote on cell B3. An error occurs because the ##XE variable is not found.

Example 8: You attempt to create a text block tag or footnote on cell B3. An error occurs because the ##XE variable is not located in the same cell range of the print area.

Was this article helpful?

We're sorry to hear that.