Skip to main content

Inserting Cells, Rows and Columns

On a worksheet cell, rows and columns can be inserted shifting the existing content of the worksheet. However, different insertion methods net different results.

Inserting Entire Rows

In the XLReporter Template Studio, insert a row by selecting an entire row and selecting Insert, Rows.

When an entire row is inserted into a worksheet every row starting at the row selected and below is shifted down by 1 row. This includes:

  • Cell Content and formatting

  • Charts

  • Images

  • Row Heights

Inserting Entire Columns

In the XLReporter Template Studio, insert a column by selecting an entire column and selecting Insert, Columns.

When an entire column is inserted into a worksheet every column starting at the column selected and to the right is shifted to the right by 1 column. This includes:

  • Cell Content and formatting

  • Charts

  • Images

  • Column Widths

Inserting Ranges

When a range is inserted into the worksheet you have the option of shifting cells right or shifting cells down. However, this only affects cells within the range inserted.

For example, with cell $B$4 selected if you insert shifting cells down, anything in the B column starting at 4 is shifted down by 1 row. Nothing else is affected. Unless charts and images are contained completely within the B column they will not be shifted down. In addition, row heights are not shifted down either.

Usage with Data Connections

As part of template design, Data Connections (as well as some Management) can be configured to insert cells, rows or columns depending on the Placement Type specified.

The Insert At Start and Insert At End types perform a range insert on the worksheet, shifting cells either down or to the right depending on Direction. The Insert At Start (full) and Insert At End (full) types perform full row or column inserts on the worksheet shifting all rows down or columns right depending on Direction.

To illustrate the behavior, consider the following scenario: a template with a single connection that returns 5 columns and 24 rows configured to cell $B$4.

If this connection is set up as Insert at Start with Direction Down, when it runs it inserts a range of 5 columns by 24 rows into worksheet. This means anything in the B – F columns below row 5 is pushed down the worksheet. Nothing else is affected.

The benefit of this configuration is that anything set up to the right of the connection is not affected by the insert of this connection so a second connection could be easily configured to the right and nothing else would have to be considered.

If this connection is set up as Insert at Start (full) with Direction Down, when it runs it inserts 24 full rows into worksheet. This means anything in any column below row 5 is pushed down the worksheet.

The benefit of this configuration is that if anything is set up below the connection that is “wider” than what the connection returns, it is shifted down and not displaced. In addition, objects like charts and images which may not fit exactly under the range of the connection are shifted down as well along with any custom row heights that may be configured.