+ Reply to Thread
Results 1 to 2 of 2

Returning Array ...

  1. #1
    Registered User
    Join Date
    07-12-2005
    Posts
    11

    Returning Array ...

    Hi,

    I have a user defined function in an xll add-in that is returning an array.
    But the dimensions of the array returned can differ from call to call.

    Is there a way to produce this scenario with Excel C API.

    * the user select a single cell
    * the user enter a function name and args
    * the user press CTRL+SHIFT+ENTER
    * the user defined function returns and array of x by y and the user can see
    it

    p.s. Then only way I can output an array is by selecting many cells and
    entering the formula, but I can't select the right number of cells because I
    don't know the size of the array that is returned.

    p.s.2 By the way, is there any available doc on Excel C API (I want to have more information on Excel Command such as "xlcCalculateDocument" or ''xlcFormulaArray". Any references?

    Thanks

    Nic

  2. #2
    Stephen Bullen
    Guest

    Re: Returning Array ...

    Hi Nicgendron,

    > I have a user defined function in an xll add-in that is returning an
    > array.
    > But the dimensions of the array returned can differ from call to call.
    >
    > Is there a way to produce this scenario with Excel C API.


    Like I said, no. In theory, the xll could monitor the Excel environment,
    look for when the user types into a cell. If it's the formula being typed
    in, work out the correct dimensions and array-enter the formula in the
    right-sized range. But I've no idea how to actually do that in C.

    > p.s. Then only way I can output an array is by selecting many cells and
    >
    > entering the formula, but I can't select the right number of cells
    > because I
    > don't know the size of the array that is returned.
    >
    > p.s.2 By the way, is there any available doc on Excel C API (I want to
    > have more information on Excel Command such as "xlcCalculateDocument"
    > or ''xlcFormulaArray". Any references?


    Steve Dalton's "Excel add-in development in C/C++"

    Regards

    Stephen Bullen
    Microsoft MVP - Excel

    Professional Excel Development
    The most advanced Excel VBA book available
    www.oaltd.co.uk/ProExcelDev



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1