xb.Func#

class excelbird.Func(*inner, res_type: type | None = None, _is_python_sum: bool = False, **kwargs)[source]#

Create a formula that uses builtin Excel functions. One Func does not correspond to a single call to an Excel function, but rather to the entire formula. Therefore, you cannot nest Func inside one another, nor would there be any reason to.

Note

Func should only be used if calling builtin Excel functions. If just arithmetic is needed to build your formula (i.e. adding/subtracting things), you can execute the expression directly in Python on layout elements, and optionally do so by referencing elements by id/header using an Expr.

Parameters:
*innerAny

Pass each section of the formula as positional arguments

res_typetype, optional

Desired return type. This is rarely needed, since often you’ll be placing Func inside a container that can only hold one type, so res_type is inferred. In some cases though, such as when inside a Stack, or when being used in a math expression prior to being placed in a layout, this will need to be specified.

**kwargsAny

Any additional keyword arguments will be passed to the constructor of the resulting object.

Methods

set