Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IRange Interface : FormulaArray Property

FormulaArray Property

Gets or sets sets the array formula of a range which can perform multiple calculations on one or more of the items in an array.
Syntax
'Declaration
 
Property FormulaArray As String
'Usage
 
Dim instance As IRange
Dim value As String
 
instance.FormulaArray = value
 
value = instance.FormulaArray
string FormulaArray {get; set;}
Example
The following code illustrates how to set and access FormulaArray property of the range.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
            
//Assign array formula
sheet.Range["A1:D1"].FormulaArray = "{1,2,3,4}";
            
//Adding a named range for the range A1 to D1
sheet.Names.Add("ArrayRange", sheet.Range["A1:D1"]);
            
//Assign formula array with named range
sheet.Range["A2:D2"].FormulaArray = "ArrayRange+100";
            
string fileName = "FormulaArray.xlsx";
workbook.SaveAs(fileName);
workbook.Close();
excelEngine.Dispose();
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also