I'm trying to calculate some formulas in my Excel file. Some of the formulas come from the Excel template and are just copied to all lines via TXLSWorksheet.CopyCell, some are set via TXLSWorksheet.AsFormula. Most of the formulas are quite simple, like

Code: Select all

`=S7`

Code: Select all

`=IF(M7>K7;M7;K7)`

Code: Select all

`=SUM(K7:K102)`

Code: Select all

`='DifferentSheet'!C4`

I did set the result type of each cell with a formula by calling TXLSWorksheet.AsNumFormulaValue. As far as I understood, this is necessary to tell the component, what data type the result of the formula will be.

I tried calculating the results via TXLSReadWriteII5.Calculate, TXLSReadWriteII5.Formulas.Calculate and also calculating each cell indiviually via TXLSWorksheet.Calculate. But for each and every formula, i get the error mentioned in the subject.

When I open the file in Excel everything is calculated as expected, so I don't think there are errors in the formulas.

Is there anything else that has to be done to calculate formulas? What could cause the errors?

Regards