So you will have to write a mathematical parser essentially? Should it be able to cope with operator priority? This would really be a big deal ...
Or maybe I didn't understand your requirement? Do you really have lots of table cells with mathematical expressions that you need to parse/evaluate into a single integer result per cell?