The FunctionValue class is used to pass arguments in and get results from custom functions.

 public class FunctionValue
Public Class FunctionValue
public FunctionValue CustomFunction(IList<FunctionValue> args, Cell currentCell)
{
    StringBuilder result = new StringBuilder("");
 
    foreach (FunctionValue arg in args)
        if (arg.Type != FunctionValueType.RANGE)
        {
            // Access the Value property and append it to the result
            result.Append(arg.Value);
        }
 
    return new FunctionValue(result.ToString());
}
Public Function CustomFunction(args As IList(Of FunctionValue), currentCell As Cell) As FunctionValue
	Dim result As New StringBuilder("")

	For Each arg As FunctionValue In args
		If arg.Type <> FunctionValueType.RANGE Then
			' Access the Value property and append it to the result
			result.Append(arg.Value)
		End If
	Next

	Return New FunctionValue(result.ToString())
End Function

Name

Description

Value

Type

Name

Description

FunctionValue(string)

Creates a new FunctionValue with the Type set to STRING

FunctionValue(bool)

Creates a new FunctionValue with the Type set to BOOLEAN
FunctionValue(double)Creates a new FunctionValue with the Type set to NUMBER
FunctionValue(Range)Creates a new FunctionValue with the Type set to RANGE