I'm using the Xlw framework which provides convenient wrappers for writing C++ add-ins in Excel. I've come across a problem: when I name an Excel function for use in Excel with a digit on the end, the function is not 'exposed' (ie. loaded by the add-in) in Excel. When I remove the last digit, or include digits in the function name but finish the function with a non-digit, it appears just fine.
AddTwo(double x) // available in Excel
Add123Two(double x) // available in Excel
Add2(double x) // not available in Excel
(C++ Excel add-ins are simply .dlls renamed to .xll with a few other specifics in the .dll contents).
I haven't seen any relevant Microsoft naming restrictions for exported .dll functions, but my question is: is it OK to create an exported .dll function that has digits as its last characters? If so, I guess the problem is Excel or Xlw framework related.
You can't call a function (used as UDF) with a name which is an address of a cell (
A1
-XFD1048576
). The same rule applies to named ranges.