jspreadsheet / pro

Jspreadsheet Pro | The javascript spreadsheet
https://jspreadsheet.com/
15 stars 1 forks source link

Intermittent error in cross-sheet calculations #304

Closed JohnPatrickOshaughnessy closed 11 months ago

JohnPatrickOshaughnessy commented 11 months ago

Sorry, orginally posted this in https://github.com/jspreadsheet/ce/issues/

I am running jspreadsheet V10

So I have four sheets in memory, all data loaded from the server with jspreadsheet.calculations(false); once all loaded I run jspreadsheet.calculations(true);.

This works for most formulas nearly all the time however I have '#ERROR' appearing in a cell with a cross sheet calculation formula about 75% of the time, the remaining 25% it works fine. With debugFormulas:true I see the following in my JS console when the error occurs:

image

Other cross sheet calculations work reliably, including those that target the result of a complex formula.

It seems to be complaining about a ':' character, I can see that the target cell in the target sheet is having its value reported as "SUM(B4:B9)" - Now this is obviously an invalid formula as it's missing the '='. However if I look at the value of the cell directly I see:

image

This would indicate that the formula in the target cell is OK, confirmed by the fact that the value displayed in B10 is indeed the expected SUM result. I'm only guessing this is the cause of the error but having spent a couple of days debugging I am running out of ideas. My feeling is that the error only happens when the target cell contains a range within a formula (like "=SUM(A1:A10)") but what's strange is that sometimes it works ok.

JohnPatrickOshaughnessy commented 11 months ago

Here's the full stack trace in case it helps:

image

hodeware commented 11 months ago

Hi John, Which version are you using? Can you contact support@jspreadsheet.com please? We would be happy to assist you.