Hi Matt,
The short answer is try dim_mem_pairs:Optional[Any]=None
The Excel C API only supports a limited set of types, so xlSlim evaluates the function and it's type hints to try determine the best types to use when registering Excel functions. What you are seeing in your original function is that xlSlim is determining that dim_mem_pairs is an optional integer:
Excel has no equivalent of string or integer, the closest is Object which can be anything.
Amending the function to use the type hint Optional[Any]
def FilingFacts(url:str, concept_id:Optional[str]=None, dim_mem_pairs:Optional[Any]=None, fiscal_period:Optional[str]=None, refresh:Optional[bool]=False) -> List[List]|None:
results in xlSlim registering the function using the Object type like this:
which should be what you are looking for.
The best solution is to write functions that expect only one type for each argument so xlSlim can match Python to Excel types as closely as possible.
Regards,
Russel