Description: Some functions like `ISDATE` are missing, instead rendered as `funct306` or some other number based on the function ID. Steps to Reproduce: Open attachment Actual Results: Formula for cell C2 is `=funct306($A2)` Expected Results: Formula for cell C2 is `ISDATE($A2)` Reproducible: Always User Profile Reset: No Additional Info: The last few releases of Numbers introduced new functions (12.1 was released in late June 2022), so libetonyek may need a refresh.
Created attachment 182665 [details] specimen
Laurent/David: one for you since it concerns libetonyek?
Appears to be this map https://opengrok.libreoffice.org/xref/libetonyek/src/lib/IWAParser.cpp?r=9c3a8cb8&mo=116710&fi=3603#3537 Tagging this as EasyHack, with some knowledge and/or debugging with a completed Numbers document the mapping could be enhanced.
list in 9c3a8cb8 extends to 303 "CurrencyCode". starting from 304, based on Numbers 12.1 : code | name in Numbers -----+---------------- 304 | ISNUMBER 305 | ISTEXT 306 | ISDATE 309 | MAXIFS 310 | MINIFS 311 | XIRR 312 | XNPV 313 | IFS 314 | XLOOKUP 315 | XMATCH 316 | SUBTOTAL 317 | COUNTMATCHES 318 | TEXTBEFORE 319 | TEXTBETWEEN 320 | TEXTAFTER 321 | REGEX 322 | REFERENCE.NAME 323 | FORMULATEXT 324 | REGEX.EXTRACT 325 | GETPIVOTDATA Laurent: There is a semi-related issue https://bugs.documentfoundation.org/show_bug.cgi?id=150782 . Seeing some of the names like `IWORKFormula::Address`, is this the right place / time to change 194 to "DURATION" and 212 to something different?
Created attachment 182700 [details] Numbers 12.1 formulae missing from 9c3a8cb8
Created attachment 182703 [details] Numbers address documentation (In reply to SheetJS from comment #5) > > Laurent: There is a semi-related issue > https://bugs.documentfoundation.org/show_bug.cgi?id=150782 . Seeing some of > the names like `IWORKFormula::Address`, is this the right place / time to > change 194 to "DURATION" and 212 to something different? I'm not sure why I wrote `IWORKFormula::Address`; maybe because I thought this function is different from the Address function of odf, but I'm not sure if this is true ( see attachment ). Otherwise yes, this function creates the result that will be returned to librevenge, so we can change the name of the functions or make special cases: for instance, if the function is "toto" and it has two parameters, return instead of toto(stack_1,stack_2): toto(tuto(stack_2), stack_1, 1) with some work. Note: - the format of iWorks files has changed over time, at first the files were compressed xml files ( and the formulas were strings, in this case IworkFormula::parse is called to convert such string into the structure wanted by librevenge). Now it uses a binary format, we just have to switch from a suffix notation to the usual notation.
> I thought this function is different from the Address function of odf, You probably tested it :) They give different results with cross-sheet/table references. =ADDRESS(2,2,2,FALSE,"Sheet2") is the string value "Sheet2!R2C[2]" in LibreOffice and Excel. In Numbers it is the string value "Sheet2::R2C[2]" using two colons. Overall the casing in the map is a bit inconsistent. A number of functions like CUMPRINC are all upper-case letters, while others like AverageIfs use proper case
(In reply to SheetJS from comment #7) > Overall the casing in the map is a bit inconsistent. A number of functions > like CUMPRINC are all upper-case letters, while others like AverageIfs use > proper case For the casing, I think I was trying to make the functions more human readable, and since I didn't know CUMPRINC, I left it that way. I would have looked at the documentation, I probably would have written it as CumPrinc to indicate that it's short for "Cumulative Principal". But feel free to change it, it doesn't really matter (as long as LibreOffice accepts to use CumPrinc or CUMPRINC in a formula).
Numbers 12.2 new functions: code | name in Numbers -----+---------------- 328 | TEXTJOIN 329 | CONCAT 330 | BITAND 331 | BITOR 332 | BITXOR 333 | BITLSHIFT 334 | BITRSHIFT 335 | ISOWEEKNUM 336 | SWITCH