Evaluate a simple spreadsheet Rules

No cell range references (A2:B3).

Maximum 9 rows and 9 columns.

No circular references or formula errors.

Empty cells evaluate to 0.

Data are numbers only, but may be taken as strings.

Formulas are strings.


Implementation choices
You must state your choices in these matters:

Require formulas to be prefixed with any single character, e.g. = – or not.

The leftmost cell of the second row is A2 or R2C1, as per the two conventions used by Excel et al.

Require any single-character pre- or suffix in cell references, e.g. $ – or not.

One of null, empty string, empty list, etc., (but not 0) to represent empty cells.

Language of your submission (spreadsheet managers are not allowed).

Language for the formulas (may differ from the above).*

Brownie points or cookies for explaining your solution.


Examples
Choices: 7: =; 8: A2; 9: none; 10: &quot;&quot;; 12: Excel Formula Language
In:
[[       2, 3],
 [&quot;=A1+B1&quot;,&quot;&quot;]]

Out:
[[2,3],
 [5,0]]

In:
[[       2,&quot;=A1+B2&quot;],
 [&quot;=A1+B1&quot;,      &quot;&quot;]]

Out:
[[2,2],
 [4,0]]

In:
[[ 3, 4,&quot;=A1*B1&quot;],
 [ 2, 5,&quot;=A2*B2&quot;],
 [&quot;&quot;,&quot;&quot;,&quot;=C1+C2&quot;]]

Out:
[[3,4,12],
 [2,5,10],
 [0,0,22]]

In:
[[&quot;&quot;,&quot;=2*B2*B3&quot;     ,&quot;&quot;],
 [ 3,&quot;=A1+(A2+C2)/2&quot;, 2],
 [ 1,&quot;=C1+(A3+C3)/2&quot;, 5]]

Out:
[[0,15,  0],
 [3, 2.5,2],
 [1, 3  ,5]]


* The formula language must be PPCG admissible, but you only have to support cell references plus criteria 3 and 4 there, wiz. addition and primeness determination.
JavaScript, 125 112 105 bytes

To use, add f= at the beginning and invoke like f(argument).

a=&gt;a.map(b=&gt;b.map(p=&gt;+p?p:p?eval(p.replace(/[A-I][1-9]/g,m=&gt;`a[${m[1]-1}][${(m.charCodeAt(0)-65)}]`)):0))


Choices:


Does not require =.
The left most cell of second row is A2.
Does not require any prefix or suffix.
"" (Empty String) to denote empty cell.
JavaScript.
JavaScript.
Cookies. 


Explanation:

This solution iterates over all the cells of the worksheet (each element of the sub-arrays of the given array) and if non-empty String is found, replaces its cell references with the corresponding references in terms of the given array and evaluates the expression with eval() (yeah, that evil thing that haunts you in your nightmares). This solution assumes that the constants provided in the input array are of Integer type.

Test Cases



f=a=&gt;a.map(b=&gt;b.map(p=&gt;+p?p:p?eval(p.replace(/[A-I][1-9]/g,m=&gt;`a[${m[1]-1}][${(m.charCodeAt(0)-65)}]`)):0))

console.log(f([[1,2,3],["A1+B1+C1",10,11]]));
console.log(f([[1,2,5,4,6,89,0],[0,1,2,3,"A2+A1",5,6]]));
console.log(f([[1,2,4,5],["A1/B1*C1+A1+Math.pow(5,B1)",2,3,4]]));