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
Funcinside 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:
- *inner
Any Pass each section of the formula as positional arguments
- res_type
type,optional Desired return type. This is rarely needed, since often you’ll be placing
Funcinside a container that can only hold one type, sores_typeis inferred. In some cases though, such as when inside aStack, or when being used in a math expression prior to being placed in a layout, this will need to be specified.- **kwargs
Any Any additional keyword arguments will be passed to the constructor of the resulting object.
- *inner
Methods
set