When you expose a Python function to Excel as a UDF (or worksheet function), the function docstring automatically gets added to Excel and is visible in Excel's function wizard.
But what if you need to give more detailed documentation than can fit in this screen? You may have noticed on the function wizard screen there is a "Help on this function" link. You can use this link to reference a CHM (Compiled HTML File) containing your more detailed documentation.
CHM, or HTML Help, files are compiled from HPP and HTML files using tools like Microsoft HTML Html (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/htmlhelp/microsoft-html-help-downloads) or other third party tools.
To reference a CHM file for a specific function, when registering the function with @xl_func set the "help_topic" kwarg to the absolute path of the .chm file to load and the section of the file to open as a numeric 'help context id' in the form "filename.chm!HelpContextID", e.g. "C:/folder/help.chm!0".
If you only want to open the chm file, you still have to provide a help context id but it can be 0. The file path should be an absolute path and must be less than 255 characters long, so you may have to use a windows short path (this is a limitation of Excel).
To add context ids to your chm file you have to add aliases to your hpp file used to make the chm file, e.g.:
---- MYHELP.HHP ----
IDH_topic_1 = myfunc1.html
#define IDH_topic_1 1001
It is not possible to link to other file types such as PDF or web sites, Excel only allows linking to CHM files from the function wizard dialog.