diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2023-06-28 16:13:45 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2024-01-31 09:14:19 +0100 |
commit | f7039822c7ad3987326e1c20ea4a745c158f9682 (patch) | |
tree | da529400e058b0a429cb0b04d23dd327608b11e6 /include/formula | |
parent | 8cccfc82a3038bc28864ae9e94418a141b4aa545 (diff) |
tdf#127293 Add Excel2021 function XLOOKUP to Calc
https://issues.oasis-open.org/browse/OFFICE-4154
What is working already: xlookup with normal forward,
backward search in columns/rows. Binary search in rows with
real binary search algorithm, in columns only works with linear search yet.
Linear forward backward wildcard/regex search in columns/rows.
Looking for the first smaller or greater value with linear and binary search
ALso all the combination of all these options. Except XLOOKUP
not supperted wildcard/regex search with binary search.
TODO in next patches:
- add the binary search option for searching in columns.
- Evaluate Formula calculation not working in general.
Co-authored-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Change-Id: I15fd4479b63ec13b093d269760d1bbb5957553e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131905
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'include/formula')
-rw-r--r-- | include/formula/compiler.hxx | 2 | ||||
-rw-r--r-- | include/formula/opcode.hxx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx index fcf7326d3e0f..479008dfb1a2 100644 --- a/include/formula/compiler.hxx +++ b/include/formula/compiler.hxx @@ -398,7 +398,7 @@ #define SC_OPCODE_CELL 385 #define SC_OPCODE_ISPMT 386 #define SC_OPCODE_HYPERLINK 387 -// free: 388 +#define SC_OPCODE_X_LOOKUP 388 // free: 389 #define SC_OPCODE_GET_PIVOT_DATA 390 #define SC_OPCODE_EUROCONVERT 391 diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx index d92ae0b1d41d..ad056a9b0b50 100644 --- a/include/formula/opcode.hxx +++ b/include/formula/opcode.hxx @@ -316,6 +316,7 @@ enum OpCode : sal_uInt16 ocCountIfs = SC_OPCODE_COUNT_IFS, ocLookup = SC_OPCODE_LOOKUP, ocVLookup = SC_OPCODE_V_LOOKUP, + ocXLookup = SC_OPCODE_X_LOOKUP, ocHLookup = SC_OPCODE_H_LOOKUP, ocMultiArea = SC_OPCODE_MULTI_AREA, ocOffset = SC_OPCODE_OFFSET, @@ -798,6 +799,7 @@ inline std::string OpCodeEnumToString(OpCode eCode) case ocCountIfs: return "CountIfs"; case ocLookup: return "Lookup"; case ocVLookup: return "VLookup"; + case ocXLookup: return "XLookup"; case ocHLookup: return "HLookup"; case ocMultiArea: return "MultiArea"; case ocOffset: return "Offset"; |