Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlookup doesn't register as a FuncVarPtg #6

Open
meygerjos opened this issue Sep 26, 2022 · 1 comment
Open

xlookup doesn't register as a FuncVarPtg #6

meygerjos opened this issue Sep 26, 2022 · 1 comment

Comments

@meygerjos
Copy link

For some reason the parser recognizes lookup but not xlookup, even though xlookup is supposed to be supported.

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
}
@meygerjos
Copy link
Author

Just put a bug report on Apache POI: https://bz.apache.org/bugzilla/show_bug.cgi?id=66283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant