Closed baderj closed 2 years ago
I think I figured out the problem. Here is a minimal example that fails:
=FORMULA(Fe1!E14, Fe2!I4)
Parsing this fails with
=FORMULA(Fe1!E14, Fe2!I4)
^
Expected one of:
* COLON
* L_PRA
* R_PRA
* LIST_SEPARATOR
* CMPOP
* ADDITIVEOP
* CONCATOP
* MULTIOP
Previous tokens: Token('__ANON_2', 'Fe1')
I suspect it is because in the reference, the sheet name (Fe1
) is also a valid cell name. Replacing the sheet name in the formula, e.g., formula = "=FORMULA(Sheet1!E14, Sheet2!I4)"
does no longer trip up Lark.
Fix this by wrapping sheet name in pyxlsb v0.0.9
https://github.com/DissectMalware/pyxlsb2/commit/0a1ff1be329aa282ecbc347ff44fc6c07351685b
and also it needs another fix in xlmdeobfuscator
update the pyxlsb from pypi and xlmdeobfuscator from repo
The following sample (link on malware bazaar) raises an
Unexpected token Token
error in v0.2.5:This could be related to #101, but since that particular issue was fixed in
v0.2.4
, I'm opening a separate issue here.