Text values in formulas are limited to 255 characters. To create text values longer than 255 characters in a formula, use the CONCATENATE function or the concatenation operator (&).

3,579 views
Skip to first unread message

Raphael do Vale

unread,
Nov 21, 2018, 5:22:26 PM11/21/18
to Excel-DNA
Hello Guys,

I am new here but I´ve been using Excel DNA for a few years. 

We are modifying a function to receive an yaml (flow style, single line) as a parameter value and, in some cases, one argument can be big, at least bigger than 255 characters. 

Is it possible to bypass this limitation and not using CONCATENATE or & (they work)?

The function is defined as follows (I have modifed some values):

[ExcelFunction(Description = "Some description", Name = "FUNCTIONNAME", IsVolatile = true, IsMacroType = true)]
        public static object[,] QtLink(
            [ExcelArgument(Name = "funcionalidade")]
            string funcionalidade,
            [ExcelArgument(Name = "grupo_ativos")]
            string grupoAtivos,
            [ExcelArgument(Name = "arquivo_configuracoes")]
            string arquivoConfiguracoes,
            [ExcelArgument(Name = "opcional")]
            params string[] opcional)
        {

The error popup appears as soon as I type the formula with an argument greater than 255 characters so I am not able to breakpoint my code somewhere.

Thank you very much,

Raphael

Govert van Drimmelen

unread,
Nov 23, 2018, 5:50:51 AM11/23/18
to exce...@googlegroups.com
Hi Raphael,

I don't expect any problems with long strings (up to 65k Unicode characters) for either arguments or return values.

Perhaps you are doing something different inside the function that has such a limitation (some Excel APIs are still limited).
Or you might be running an old Debug build of Excel-DNA - I used to compile the debug versions so that it targets the old Excel 2003 API for testing.

-Govert


From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Raphael do Vale [raphae...@gmail.com]
Sent: 22 November 2018 12:22 AM
To: Excel-DNA
Subject: [ExcelDna] Text values in formulas are limited to 255 characters. To create text values longer than 255 characters in a formula, use the CONCATENATE function or the concatenation operator (&).

--
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 https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages