Error E4003: Invalid fractional number on calculate

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
AVogel
Posts: 1
Joined: Wed Jul 08, 2020 12:42 pm

Error E4003: Invalid fractional number on calculate

Post by AVogel »

Hello,

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)
or

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
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Error E4003: Invalid fractional number on calculate

Post by larsa »

Hello

Please send me the excel file you calculate.
Lars Arvidsson, Axolot Data
Post Reply