Defining The Target Range, Row, Column, Or Cell

Normally, you would want to define the data destinations first and then use the assigned variables in other method calls. The dashboard processor (i.e., $dashboardProcessor) provides the following methods for defining a target cell, row, column, and range:

1. A single cell:

getCell($excelCellReference)

getCell($sheetName, $columnName, $rowNumber)

2. A single row:

  getRow($excelRowReference) 

  getRow($sheetName, $startColumnName, $endColumnName, $rowNumber) 

3. A single unbounded column:

  getColumn($excelColumnReference) 

 getColumn($sheetName, $columnName) 

4. A single bounded column:

 getColumn($excelColumnReference) 

  getColumn($sheetName, $columnName, $startRowNumber, $endRowNumber) 

5. An unbounded range:

  getRange($excelRangeReference) 

 getRange($sheetName, $startColumnName, $endColumnName) 

6. A bounded range:

 getRange($excelRangeReference) 

 getRange($sheetName, $startColumnName, $startRowNumber, $endColumnName, $endRowNumber) 

You can use any valid Excel cell/row/column/range reference as a single argument or, preferably, you can use the form with separate components of the reference. Any of the arguments can be either variables or constant. Here are some examples:

  #set( $reportDateCell = $dashboardProcessor.getCell('Dashboard', 'D', 4)) 

  #set( $targetRow = $dashboardProcessor.getRow('Dashboard', 'B', 'G', $rowIndex)) 

  #set( $targetRange = $dashboardProcessor.getRange('DataSheet3', 'A', 'F'))