FunctionWizard does not show all Parameters

260 views
Skip to first unread message

Eric

unread,
Oct 4, 2013, 12:08:05 PM10/4/13
to exce...@googlegroups.com
Hi Govert,

I've encountered an issue on one of my functions wherein I need to extend the number of input parameters. 

When I try to add one or more parameters from the original set the FunctionWizard does not work, well it pops up but it only shows one input box. I know its not in the number of parameters because I only have at least 23 input parameters.

Have you encountered something like this. I am using Excel DNA version 0.28.3958.28648

Regards,
Eric

Govert van Drimmelen

unread,
Oct 6, 2013, 8:49:54 AM10/6/13
to exce...@googlegroups.com
Hi Eric,

Excel has some string length limitations and a few other bugs related to the function wizard. The total length of the argument names string (they all have to be concatenated together) has some limit.
I think in more recent versions of Excel-DNA I truncate the strings before registering, so that they work as well as possible.

-Govert

Eric

unread,
Oct 7, 2013, 4:52:46 AM10/7/13
to exce...@googlegroups.com
Thanks Govert. Abbreviating the parameter names solved the problem. I will look into using the latest version of ExcelDNA in the future.

Regards,
Eric

mobigital

unread,
Apr 21, 2015, 10:14:14 AM4/21/15
to exce...@googlegroups.com
Govert,

Do you know if the limitation of total number of characters in argument names present in ExcelDNA .032 and Excel 2013 combination?

i am seeing only 18 out of 24 parameters of the function in the wizard, while the wizard title of the last parameter is truncated by 3 characters,
with this is makes total # of shown characters of parameter titles (ExcelArgument(Name)) sum up to 238  (241 if last parameter wasn't truncated).

without truncation the sum of lengths of name + description texts corresponding to the 18 shown parameters is 429
name + c# function param name = 421

many thanks!

Govert van Drimmelen

unread,
Apr 21, 2015, 10:29:05 AM4/21/15
to exce...@googlegroups.com

Hi,

 

Excel-DNA truncates those strings to 255 chars before registering, since the registration would otherwise have failed in Excel.

The wizard title truncation is a long-standing Excel bug (from Excel ’97, I believe).

 

I can’t remember checking whether the Excel string length limitations on the registration strings is still present in Excel 2013, but there was no indication that it was removed. I’ll try to check later in the week.

 

Regards,

Govert

 

 

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

mobigital

unread,
Apr 21, 2015, 12:29:23 PM4/21/15
to exce...@googlegroups.com
Interesting! with adding one extra byte for the termination of each parameter name, this perfectly adds up to 255 at the point of truncation at the 18th argument.

Govert van Drimmelen

unread,
Apr 23, 2015, 7:00:47 AM4/23/15
to exce...@googlegroups.com
Hi mobigital,

OK - I've had a quick look, and it seems Excel 2013 still has the limitation of 255 characters in the strings passed to xlfRegister.

You might like to chime in on this MSDN thread to indicate your interest in a future Excel version addressing this limitation: https://social.msdn.microsoft.com/Forums/office/en-US/54d259bd-a2ae-4118-87b0-a59035e6ef75/please-remove-remaining-255-character-api-limitations?forum=exceldev

Also if you have access to a Microsoft account manager, noting this issue to them might help it escalate to the right team.

-Govert

Terry Aney

unread,
Jun 26, 2024, 2:54:22 PMJun 26
to Excel-DNA
Hi, link's dead for Excel comment.  Is it still issue in Office 365?  Note, that a length of 271 seemed to still work for me.  Is the logged message " ExcelDna.Integration Warning: 3 : Truncated argument names of function '...'  " coming from "Excel" or "DNA"?

BTRGetERContribution Parameters, Count: 22, Length: 271
contType
contParam
year
monthEnd
payPeriod
ratePay
payPeriodWhenPayIncreases
ratePayIncrease
rateInflation
rateReturn
startPayPeriod
ytdPay
ytdERCont
ageBOY
svcBOY
erContAnnualLimit
erContFreq
midPointCont
noLimit
limitPay
limitCont
overflowToNonQual

Screenshot 2024-06-26 135236.png

Terry Aney

unread,
Jun 26, 2024, 2:57:41 PMJun 26
to Excel-DNA
Sorry, questions still valid, but 271 was a miscalculation by me.

Govert van Drimmelen

unread,
Jun 26, 2024, 7:30:40 PMJun 26
to exce...@googlegroups.com

Hi Terry,

 

The message you see is coming from Excel-DNA when it truncates the argument names string to 255 characters.

The limitation is still present in the current version of Excel - registration will still fail if the argument names string is too long.

 

-Govert

Terry Aney

unread,
Jun 27, 2024, 11:17:45 AMJun 27
to Excel-DNA
To add a little clarification (probably mentioned somewhere, but adding here in case myself or someone stumbles on this post)...the limit is:

parameters.Count() + parameters.Sum( p => p.Name.Length ) <= 255

Reply all
Reply to author
Forward
0 new messages