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.
Coordinator
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.

-Govert
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
Coordinator
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:
http://social.msdn.microsoft.com/Forums/office/en-US/54d259bd-a2ae-4118-87b0-a59035e6ef75/please-remove-remaining-255-character-api-limitations?forum=exceldev
http://answers.microsoft.com/en-us/office/forum/office_2013_release-excel/excel-remaining-255-character-limitations-in-apis/ca1893a4-c726-4e3b-9ad1-f7975aea135b

Regards,
Govert
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.

Regards,
John
Jun 18, 2014 at 3:34 PM
Hi,
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)
Regards,
John

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