Skip to content

getValues

The getCalculated method returns values from a range as a JavaScript string array.

Syntax

getValues (range, calculationId)

Arguments

range : string (required)

The range to return. This can be any of the following:

  • A1 reference
  • R1C1 reference
  • A1:B6 reference
  • Named range

calculationId : number

If empty, this will get the range values being asked for from the current report’s last calculation.

If an ID is specified, then it will use the results from that calclation.

Return

The result of this function is a JavaScript string array of values in the following format:

[ 
  "123",
  "Hello",
  "$123.00"
]

Examples

//
// Example 1 - Retrieve the values from range A1 from the current reports last calculation
//
var values1 = report.api.getValues("A1"); 

//
// Example 2 - Retrieve the values from range A1:B3 from the current reports last calculation
//
var values2 = report.api.getValues("A1:B3");

//
// Example 3 - Retrieve the values from  range A1:B3 from the calculationId 1232
//
var values3 = report.api.getValues("A1:B3", 1232);
Back to top