Warning: Nasty and inconsistent Excel behaviour when UDF Description is > 255 characters

Jun 18, 2014 at 9:20 AM
Just found a nasty difference in Excel version behaviour if you have a UDF Description longer than 255 characters. In 2003 on XP, the description is truncated. In 2010 on Win7 there is no error or warning but the function simply does not load and is not available. All other UDFs in the XLL are OK.
Jun 18, 2014 at 9:26 AM
What version of Excel-DNA are you using?

The current version should be truncating the description if needed, but the function should still be registered.

Jun 18, 2014 at 9:36 AM
I should have made it clear that I consider this gotcha is an Excel bug and not a problem in ExcelDNA.
For the record, I found the problem while using 0.29
Truncating the description sounds the right way of avoiding people stumbling into this Excel issue.

Thanks for working around Excel's bug in the latest version :-)
  • John
Jun 18, 2014 at 9:45 AM
Hi John,

I'd appreciate if you can confirm that this is fixed in the current version.

The truncation under Excel 2003 was just a side-effect of the C API string length limitation under Excel 2003. Under Excel 2007 this is an undocumented limitation of the registration call.

You can encourage the Excel team to look at this in future Excel versions by adding your voice to these posts:

Jun 18, 2014 at 2:18 PM
I have retested with a more recent version.

I can confirm that Excel-DNA version 0.32 gets around the Excel 2010 bug.

Jun 18, 2014 at 3:34 PM
Just to let you know that I was unable to add anything to the second of these for some reason (possibly I have a version of Internet Explorer which is too old)

John Denniston
Pricing Tools
10 Gresham Street, London, EC2V 7AE
Telephone: +44 20 7158 1279 | Mobile: 07804 861 272 | Email: [email removed]