dgorissen / pycel

A library for compiling excel spreadsheets to python code & visualizing them as a graph
GNU General Public License v3.0
570 stars 149 forks source link

String concatenation fails for particular cases #109

Closed bogdan-oprescu-nxp closed 3 years ago

bogdan-oprescu-nxp commented 3 years ago

What actually happened

Formula '="0x"&"3e8000"' will e evaluated to '0xinf'

What was expected to happen

Formula should be evaluated to '="0x3e8000"'

Problem description

For the string concatenation operator '&' all operands are forcedly evaluated to numbers. This will fail when a valid string will be evaluated to number, like the example above, when he hex number e38000 will be interpreted as 3^8000.

Code Sample