Skip to main content

SetFormulaArray

Sets an array formula to the current range.

Syntax

expression.SetFormulaArray(data);

expression - A variable that represents a ApiRange class.

Parameters

NameRequired/OptionalData typeDefaultDescription
dataRequiredstring | boolean | numberThe general value for the cell or cell range.

Returns

boolean

Example

This example sets the array formula of a range.

// How to set the array formula value.

// Set the array formula.

let worksheet = Api.GetActiveSheet();
worksheet.GetRange("A1:C3").SetFormulaArray("={1,2,3}");