SharpCell

FunctionOptions

public sealed class FunctionOptions

Namespace SharpCell · package SharpCell

How a function added through Workbook.Functions takes its arguments.

Constructors

FunctionOptions()

public FunctionOptions()

Options for any number of arguments, all passed as they are, and a function that is not volatile.

Properties

IsVolatile

public bool IsVolatile { get; init; }

Whether the function is calculated on every Workbook.Recalculate, like NOW, instead of only when its arguments change.

MaxArguments

public int MaxArguments { get; init; }

The most arguments a call may have, up to 255 as in Excel; more make the call #VALUE!. Default 255.

MinArguments

public int MinArguments { get; init; }

The fewest arguments a call may have; fewer make the call #VALUE!. Default 0.

ScalarParameters

public IReadOnlyList<int> ScalarParameters { get; init; }

The 0-based positions of scalar parameters. A scalar parameter receives one value: given a range or an array, the function is called once per element and the results spill, as with Excel's own functions such as LEN(A1:A10). Other parameters receive the argument as it is: a range as an array of its values.