Re: Control function output



Hi,

It does not sounds like you are writing a function, A function returns a value (which could be an array). Gnumeric then handles the returned value.

You really seems to want to interact with the worksheet in question directly. So the function call might trigger this side effect of writing to random (not in the probabilistic sense) cells, possible overwriting other cell content.

I don't think there is any example for that.

Andreas

On 14-08-05 02:43 AM, John Bale wrote:
How can I control the cells to which I output an array of values from a function?

I am writing a plugin function.

As an example, looking at the adtest() function, the output array is specified in the function as (1,3) or  1 column and 3 rows. This is fine, as the user preselects  3 cells in one column. If you select any more you will get a #N/A returned in the extra cell. This extra cell(s) cannot be removed by the user without a redo of the array entry i.e delete everything and re-select only the cells needed.

For the function I am writing I do not know the array output size - it is variable. What I would like to do is allow the user to specify only the first cell and the function to control the output to the sheet. i.e is there a way to select the sheet cells from within the function to which the function will then output the array?

I’d be grateful if someone familiar with the code could indicate if this has been done somewhere and where I could find an appropriate example that may give me a clue as to how cell selection is controlled or stored at run time.

Thanking you in advance.


_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
https://mail.gnome.org/mailman/listinfo/gnumeric-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]