fdo77985 Calc function NETWORKDAYS
erack at redhat.com
Tue May 6 12:01:49 PDT 2014
On Tuesday, 2014-04-29 10:26:03 +0200, Winfried Donkers wrote:
> Calc function NETWORKDAYS is an add-in function and compatible with Excel's function NETWORKDAYS, but _not_ with Oasis ODFF 1.2 (http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-part2.html#__RefHeading__1018198_715980110) .
> My first impression is that I could tweak the current code and make the function compatible with both.
> For Excel the 3rd argument is a reference to a (range of) date, for ODFF it is a (reference to) matrix of 0 and 1. That means I can distinguish between the two. That distinction is important when exporting to Excel, too.
> Do you think this is worth trying? Or would you prefer two internal functions, one regular in ScInterpreter (new, but using code from ScInterpreter::ScNetWorkdays_MS()) and one add-in (existing)? In that case I would need some hints where to make the switch from NETWORKDAYS in the cell (UI or file) and the two internal functions.
I'd avoid changing existing Add-In functions, it's a source of hassle ;-)
We also have better control over functionality and mappings in the
compiler when using internal interpreter functions.
Rather implement an ODFF compliant NETWORKDAYS function at the
interpreter that shares implementation with ScNetWorkdays_MS() (syntax
and semantics are equal, aren't they? I didn't look up now) and rename
the Add-In one to NETWORKDAYS_ADD, note that this will also need
adapting the entry in sc/source/core/tool/odffmap.cxx and the entries in
the mappings of sc/source/filter/excel/xlformula.cxx and
sc/source/filter/oox/formulabase.cxx, the latter may probably write
NETWORKDAYS.INTL for the ODFF NETWORKDAYS. I'll help you to figure out
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the LibreOffice