https://bz.apache.org/bugzilla/show_bug.cgi?id=66283

            Bug ID: 66283
           Summary: xlookup doesn't register as a FuncVarPtg
           Product: POI
           Version: 5.2.2-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: meyger...@gmail.com
  Target Milestone: ---

For some reason the parser recognizes lookup but not xlookup, even though
xlookup is supposed to be supported
(https://poi.apache.org/components/spreadsheet/eval-devguide.html)

Code:

```
System.out.println("Parse \"LOOKUP(E76,$A$13:$A$41,$F$13:$F$41)\"");
for (Ptg ptg : FormulaParser.parse("LOOKUP(E76,$A$13:$A$41,$F$13:$F$41)", ewb,
FormulaType.CELL, wb.getSheetIndex(sheet))) {
    System.out.println(ptg);
}
System.out.println("Parse \"XLOOKUP(E76,$A$13:$A$41,$F$13:$F$41)\"");
for (Ptg ptg : FormulaParser.parse("XLOOKUP(E76,$A$13:$A$41,$F$13:$F$41)", ewb,
FormulaType.CELL, wb.getSheetIndex(sheet))) {
    System.out.println(ptg);
}
```

Output:
```
Parse "LOOKUP(E76,$A$13:$A$41,$F$13:$F$41)"
{   /* RefPtg */
          "row": 75 /* 0x0000004b */
        , "rowRelative": true
        , "column": 4
        , "colRelative": true
        , "formatReference": "E76"
}
{   /* AreaPtg */
          "firstRow": 12 /* 0x0000000c */
        , "firstRowRelative": false
        , "firstColumn": 0
        , "firstColRelative": false
        , "lastRow": 40 /* 0x00000028 */
        , "lastRowRelative": false
        , "lastColumn": 0
        , "lastColRelative": false
        , "formatReference": "$A$13:$A$41"
}
{   /* AreaPtg */
          "firstRow": 12 /* 0x0000000c */
        , "firstRowRelative": false
        , "firstColumn": 5
        , "firstColRelative": false
        , "lastRow": 40 /* 0x00000028 */
        , "lastRowRelative": false
        , "lastColumn": 5
        , "lastColRelative": false
        , "formatReference": "$F$13:$F$41"
}
{   /* FuncVarPtg */
          "functionIndex": 28 /* 0x001c */
        , "functionName": "LOOKUP"
        , "numberOfOperands": 3
        , "externalFunction": false
        , "defaultOperandClass": 32 /* 0x20 */
        , "cetab": false
}
Parse "XLOOKUP(E76,$A$13:$A$41,$F$13:$F$41)"
{   /* NameXPxg */
          "externalWorkbookNumber": -1 /* 0xffffffff */
        , "sheetName": null
        , "nameName": "XLOOKUP"
}
{   /* RefPtg */
          "row": 75 /* 0x0000004b */
        , "rowRelative": true
        , "column": 4
        , "colRelative": true
        , "formatReference": "E76"
}
{   /* AreaPtg */
          "firstRow": 12 /* 0x0000000c */
        , "firstRowRelative": false
        , "firstColumn": 0
        , "firstColRelative": false
        , "lastRow": 40 /* 0x00000028 */
        , "lastRowRelative": false
        , "lastColumn": 0
        , "lastColRelative": false
        , "formatReference": "$A$13:$A$41"
}
{   /* AreaPtg */
          "firstRow": 12 /* 0x0000000c */
        , "firstRowRelative": false
        , "firstColumn": 5
        , "firstColRelative": false
        , "lastRow": 40 /* 0x00000028 */
        , "lastRowRelative": false
        , "lastColumn": 5
        , "lastColRelative": false
        , "formatReference": "$F$13:$F$41"
}
{   /* FuncVarPtg */
          "functionIndex": 255 /* 0x00ff */
        , "functionName": "#external#"
        , "numberOfOperands": 4
        , "externalFunction": true
        , "defaultOperandClass": 32 /* 0x20 */
        , "cetab": false
}
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to