I am using ClosedXML 0.76.0 to build my application, which handles Excel files.
At one moment, I populate an Excel file with formulas. So far, so good.
The user then gets this file and fills in values concerning the business.
At this moment, I read calculated values and populate another larger Excel file.
The problem is that when I try reading cells with fomulas, ClosedXML throws "Identifier Expected" exception.
My code is just as follows:
```
1 string formula = row.Cell(i).FormulaA1;
2 object result = workbook.Evaluate(formula);
3 sum += Convert.ToDecimal(result, CultureInfo.InvariantCulture);
```
The exception happens on line 2.
The formula is likely to be _'Indice'!D$5*'URCTS - 210'!G5_ or similar. There are single quotes delimiting worksheet names containing spaces.
At one moment, I populate an Excel file with formulas. So far, so good.
The user then gets this file and fills in values concerning the business.
At this moment, I read calculated values and populate another larger Excel file.
The problem is that when I try reading cells with fomulas, ClosedXML throws "Identifier Expected" exception.
My code is just as follows:
```
1 string formula = row.Cell(i).FormulaA1;
2 object result = workbook.Evaluate(formula);
3 sum += Convert.ToDecimal(result, CultureInfo.InvariantCulture);
```
The exception happens on line 2.
The formula is likely to be _'Indice'!D$5*'URCTS - 210'!G5_ or similar. There are single quotes delimiting worksheet names containing spaces.