officefileapi-devexpress-dot-spreadsheet-dot-dynamicarrayformulacollection-dot-add-x28-devexpress-dot-spreadsheet-dot-cellrange-system-dot-string-x29.md
Adds a new dynamic array formula to the collection.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
DynamicArrayFormula Add(
CellRange range,
string formula
)
Function Add(
range As CellRange,
formula As String
) As DynamicArrayFormula
| Name | Type | Description |
|---|---|---|
| range | CellRange |
The range to which the array formula applies.
| | formula | String |
The dynamic array formula.
|
| Type | Description |
|---|---|
| DynamicArrayFormula |
The newly added formula.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Add(CellRange, String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
worksheet["A2"].DynamicArrayFormulaInvariant = "={\"Red\",\"Green\",\"Orange\",\"Blue\"}";
worksheet.DynamicArrayFormulas.Add(worksheet["B1"], "=LEN(A2:D2)");
#endregion #DynamicArrayFormulas
worksheet["A2"].DynamicArrayFormulaInvariant = "={\"Red\",\"Green\",\"Orange\",\"Blue\"}";
worksheet.DynamicArrayFormulas.Add(worksheet["B1"], "=LEN(A2:D2)");
#endregion #DynamicFormulas
worksheet["A2"].DynamicArrayFormulaInvariant = "={\"Red\",\"Green\",\"Orange\",\"Blue\"}";
worksheet.DynamicArrayFormulas.Add(worksheet["B1"], "=LEN(A2:D2)");
#endregion #DynamicFormulas
worksheet("A2").DynamicArrayFormulaInvariant = "={""Red"",""Green"",""Orange"",""Blue""}"
worksheet.DynamicArrayFormulas.Add(worksheet("B1"), "=LEN(A2:D2)")
#End Region ' #ArrayFormulas
worksheet("A2").DynamicArrayFormulaInvariant = "={""Red"",""Green"",""Orange"",""Blue""}"
worksheet.DynamicArrayFormulas.Add(worksheet("B1"), "=LEN(A2:D2)")
' #End Region ' #DynamicFormulas
worksheet("A2").DynamicArrayFormulaInvariant = "={""Red"",""Green"",""Orange"",""Blue""}"
worksheet.DynamicArrayFormulas.Add(worksheet("B1"), "=LEN(A2:D2)")
' #End Region ' #DynamicFormulas
See Also
DynamicArrayFormulaCollection Interface