Gonzalo Diethelm wrote:
Hello,
I am a TOTAL newbie (read: never done anything) when it comes to
developing for OpenOffice.org. But I have done some development of MS
Excel add-ins in C, which end up being registered as additional
functions directly callable from an Excel spreadsheet. So, to make my
question clearer, let's say I have a pure C (not C++) module with one
public function:
int get_easter(int year, int* month, int* day);
Given a year (i.e. 2007), it will put into month and day the date for
Easter that year (i.e. month == 4, day == 8), and return something
useful (say, the int value 20070408). The question is: how can I make
this function available in Spreadsheet, so that I can write in any given
cell:
Note that you cannot specify out-parameters in Calc addins (i.e. you
cannot pass back a value in 'month' and 'day' parameters), only a single
return value is possible. Therefore the EASTERSUNDAY function that is
already contained in Calc returns the serial number of the date of
Easter sunday of the specified year, e.g. =EASTERSUNDAY(2007). Once you
have this serial number in a cell, you can either format it with a date
number format, or you can use the DAY and MONTH functions to extract the
day and month from the date.
Regards
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]