Async execution

Python functions execute asynchronously using Excel's RTD mechanism. This means they do not block Excel as they run. This is ideal for queries to external systems such as databases or remote APIs.

Slow operations

Long-running operations work naturally:

my_functions.py
@xllify.fn("xllipy.SlowQuery")
def slow_query(query: str) -> str:
    import time
    time.sleep(5)  # Simulate database query
    return f"Results for: {query}"

Excel won't freeze. The cell shows #N/A while processing, then updates when complete.

HTTP requests

my_fetch.py
import requests

@xllify.fn("xllipy.FetchData")
def fetch_data(url: str) -> str:
    response = requests.get(url, timeout=10)
    return response.text

Multiple calls

If you have a range of formulas calling slow functions, they all execute in parallel:

A1: =xllipy.SlowQuery("query1")
A2: =xllipy.SlowQuery("query2")
A3: =xllipy.SlowQuery("query3")

Concurrency level is limited by the number of Python processes running. xllify will load balance over n processes.

Caching

Results are cached. If you recalculate (F9), completed functions return instantly from cache.

To clear the cache run :

$ xllify-clear-cache

Or edit the cell to trigger a new request.

Last updated