vinci1it2000 / formulas

Excel formulas interpreter in Python.
https://formulas.readthedocs.io/
European Union Public License 1.1
342 stars 75 forks source link

How to have an exception when a formula is not supported #128

Open vlagorsse opened 5 months ago

vlagorsse commented 5 months ago

Is your feature request related to a problem? Please describe. When something is not supported in the excel file, the library is silently continuing. It's just displaying some logs like this:

Failed DISPATCHING 'COUNTIFS' due to:
  NotImplementedError()
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/schedula/utils/sol.py", line 548, in _evaluate_node
    value = self._evaluate_function(args, node_id, node_attr, attr,
  File "/usr/local/lib/python3.10/site-packages/schedula/utils/sol.py", line 520, in _evaluate_function
    res = async_process(
  File "/usr/local/lib/python3.10/site-packages/schedula/utils/asy/__init__.py", line 211, in async_process
    res = (exe and exe.process_funcs or _process_funcs)(
  File "/usr/local/lib/python3.10/site-packages/schedula/utils/asy/__init__.py", line 169, in _process_funcs
    r['res'] = e.process(sid, fn, *args, **kw) if e else fn(*args, **kw)
  File "/usr/local/lib/python3.10/site-packages/formulas/functions/__init__.py", line 106, in not_implemented
    raise NotImplementedError
NotImplementedError

Describe the solution you'd like An exception to be raised when calling ExcelModel::loads

Describe alternatives you've considered We could also consider something like an errors array to be checked.

Additional context Any workaround to check the validity of the excel file against formulas is welcomed