none
Can not display full characters of ArgumentHelp in the last parameter of function in XLL add-in? RRS feed

  • Question

  • Hello everyone,

    I create function in XLL add-in but it can not display full characters of ArgumentHelp in the last parameter. 

    My function:

    #define g_rgWorksheetFuncsCols 10

    __declspec(dllexport) LPXLOPER12 WINAPI MyFuncParamsC(LPXLOPER12 a, LPXLOPER12 b)
    {
    return (LPXLOPER12)TempNum12(a->val.num + b->val.num);
    }

    __declspec(dllexport) int WINAPI xlAutoOpen(void)
    {

    //....

    Excel12f(xlfRegister, 0, 2 + g_rgWorksheetFuncsCols,
    (LPXLOPER12)&xDLL,
    (LPXLOPER12)TempStr12(L"MyFuncParamsC"),
    (LPXLOPER12)TempStr12(L"UUU"),
    (LPXLOPER12)TempStr12(L"MyFuncParamsC"),
    (LPXLOPER12)TempStr12(L"A,B"),
    (LPXLOPER12)TempStr12(L"1"),
    (LPXLOPER12)TempStr12(L"Generic Add-In"),
    (LPXLOPER12)TempStr12(L""),
    (LPXLOPER12)TempStr12(L""),
    (LPXLOPER12)TempStr12(L"This is FunctionHelp"),
    (LPXLOPER12)TempStr12(L"This parameter 1"),
    (LPXLOPER12)TempStr12(L"This parameter 2"));

    }

    BUT when I display function in dialog "Function Arguments" the second parameter is not full. It lost the last character. It display "This parameter " lost "2" is the last character. If it is "This parameter 2" is correct. It is error in the last parameter any way. Please help to fix it?


    Thank for support team!


    • Edited by Add-in A-Tools Wednesday, August 14, 2019 9:29 AM add #define g_rgWorksheetFuncsCols 10
    Wednesday, August 14, 2019 9:07 AM

All replies

  • This is an old Excel Bug:

    Either padd your last help Argument with at least two spaces or add an additonal blank text Argument

    hope this helps.

      

      Hendrik Schmieder

      

    • Proposed as answer by h_schmieder Friday, August 16, 2019 7:44 AM
    Thursday, August 15, 2019 1:09 PM
  • This is an old Excel Bug:

    Either padd your last help Argument with at least two spaces or add an additonal blank text Argument

    hope this helps.

      

      Hendrik Schmieder

      

    I have add an additional blank text then the last argument help show full, but if I declare param array Argument_text = 'n1,n2,...' then error display argument text from the second parameter. Could you check it ?

    Thank you!

    Thursday, August 15, 2019 3:46 PM
  • How Can I ?

    Without sample Code for second question I have no clue what you are talking about.

    Friday, August 16, 2019 7:47 AM
  • In XLL SDK, file Generic.C" has sample function "FuncSum" ít parameteres is optional so Argument_help = L"Number1,number2,... are 1 to 29 arguments for which you want to sum."

    Sample code here:

    #define g_rgWorksheetFuncsRows 3 #define g_rgWorksheetFuncsCols 10 static LPWSTR g_rgWorksheetFuncs [g_rgWorksheetFuncsRows][g_rgWorksheetFuncsCols] = { { L"Func1", // Procedure L"UU", // type_text L"Func1", // function_text L"Arg", // argument_text L"1", // macro_type L"Generic Add-In", // category L"", // shortcut_text L"", // help_topic L"Hàm này trả về chuỗi unicode", // function_help L"Argument ignored" // argument_help1 }, { L"FuncSum", L"UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU", // up to 255 args in Excel 2007 and later, // upto 29 args in Excel 2003 and earlier versions L"FuncSum", L"number1,number2,...", L"1", L"Generic Add-In", L"", L"", L"Adds the arguments", L"Number1,number2,... are 1 to 29 arguments for which you want to sum." }, { L"FuncFib", L"UU", L"FuncFib", L"Compute to...", L"1", L"Generic Add-In", L"", L"", L"Number to compute to" L"Computes the nth fibonacci number", }, };


    Saturday, August 17, 2019 5:39 AM
  • Hello,

    I thought that is was clear that you have to add a blank line for EACH function definition.

    hope this helps.

       Hendrik

    Monday, August 19, 2019 8:02 AM