Author Topic: Limitations on doc strings and help file format  (Read 741 times)


  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Limitations on doc strings and help file format
« on: September 15, 2013, 02:29:52 AM »
I found that adding a long text string as an input parameter description for a UDF seems to prevent the UDF from compiling properly.  The string causing the problem was 272 characters long.  Reducing it to about 160 characters solved the problem.

Is there a specific limit on the total length of the docstring, and/or the length of each line, and if so is there any way to get around that?

Also the manual refers to linking to a help file.  What format should that file be in?


  • Administrator
  • Hero Member
  • *****
  • Posts: 638
  • Karma: +15/-1
    • View Profile
Re: Limitations on doc strings and help file format
« Reply #1 on: September 17, 2013, 10:03:43 AM »

yes, those string length limitations are set by Excel so there is no way to use longer strings. It would be nicer if PyXLL would check for that and log a warning and truncate the string rather than fail to register the function though, so I will look into that.

The help file should be a .chm or .hlp file. It can either be a filepath or a url. You must also include a context id as an integer after the file separated with by a "!". The final string must be in the form "filePath!HelpContextId". Apologies that this isn't explained in the docs. This argument is passed directly to the Excel C Api function "xlfRegister" which you can read about here:

Best regards,