Bug 74225 - FILESAVE/FILEOPEN: Uncalculated cached formula results stored in file.
Summary: FILESAVE/FILEOPEN: Uncalculated cached formula results stored in file.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.4.2 release
Hardware: All Windows (All)
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 14:52 UTC by Kenny Hayes
Modified: 2018-08-29 08:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Input is done on the first sheet. The "print" sheet shows the result of a series of calculations that we need to print for our AARP volunteer tax work.. (359.15 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-30 14:52 UTC, Kenny Hayes
Details
Same file as before -- unprotected (359.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-30 18:56 UTC, Kenny Hayes
Details
workbook for Libre or Open Office (370.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-31 19:18 UTC, Kenny Hayes
Details
Autocalculate doesn't happens sheet at this spreadsheet (14.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-01-04 23:13 UTC, Grobe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenny Hayes 2014-01-30 14:52:55 UTC
Created attachment 93060 [details]
Input is done on the first sheet. The "print" sheet shows the result of a series of calculations that we need to print for our AARP volunteer tax work..

Calculations in the attached document are incorrect in LibreOffice (but correct in OpenOffice) on the "print" sheet on row 26 in the third column. 
The correct amount ($335) shows in OpenOffice -- but not in Libre.

Also, sometimes the exclusion amount calculated on row 16 (in green) is also incorrect. 

When we open the attached file in Libre, the exclusion amount on the "print" sheet shows to be $18.94. When we retype the input on the "inputs" sheet, this amount changes to $27.95.

When we open the attached file in OpenOffice, everything is correct.
Comment 1 Eike Rathke 2014-01-30 17:01:53 UTC
It would had been easier to analyze if the sheets weren't password protected so such things as the hidden columns BD:BN could be revealed without fiddling with the document.. however, a simple hard recalculation (Shift+Ctrl+F9) already displayed $335 in print.F26 (what I guess you meant with "row 26 in the third column").

print.F26 : =BF4  => 0; after recalc 335
print.BF4 : =$calculations.T52  => 0; after recalc 335
calculations.T52 : =ROUND(R52*R54,0)  => 227; after recalc 335

Note that I loaded the document with macros disabled and didn't investigate yet what they are doing and if that might be related.

I presume that the document was stored in an uncalculated state. OpenOffice always recalculates everything upon load hence gets the same results as LibreOffice after recalc. LibreOffice does not recalculate after load if the document was generated with the same version as the version it is loaded in.

It would be good to know why the document was saved in such uncalculated state. Was automatic recalculation disabled when saving?
Comment 2 Kenny Hayes 2014-01-30 18:56:34 UTC
Created attachment 93079 [details]
Same file as before -- unprotected

I have tracked one Libre error to the following:

On the "print" sheet, F26 = BF4 which is supposed to equal =$calculations.T52 (T52 on the "calculations" sheet) -- but it does not.

Again, it calculates correctly in OpenOffice, but not Libre.

Macros are not needed or used in any calculations.

I don't understand "uncalculated state". I am used to the calculations being done immediately as input is made. 

If I open a new clean document with no input and enter the input, the error in F23 is still there.

I can upload a clean document if that would be of any help.

Is it ever possible to talk through the questions by phone?

We really, really appreciate the help. We have volunteers across the country who are depending on this working Monday.

THANKS!
Comment 3 Eike Rathke 2014-01-30 22:26:54 UTC
As said in my previous comment, after having the document loaded please hit the key combination Shift+Ctrl+F9 to recalculate the entire document and the results will be correct.

For the uncalculated state note that automatic recalculation can be turned off with menu Tools -> Cell Contents -> AutoCalculate.

Attaching a clean document with a description what to enter where to reproduce the failure may help.
Comment 4 Kenny Hayes 2014-01-31 19:18:20 UTC
Created attachment 93148 [details]
workbook for Libre or Open Office
Comment 5 Kenny Hayes 2014-01-31 19:20:03 UTC
THANK YOU, Eike!

Yes, the Ctrl-Shift-F9 works great.
But I really need it to work automatically. This SimplifiedMethodCalculator is used by thousands of AARP volunteers across the country. It calculates tax exclusions for the seniors and low-income people we serve.

Unfortunately, many of our volunteers need things to be automatic. It is automatic with OpenOffice. It is not automatic with the default installation of Libre.

Attached is a clean calculator they would start with. 
Below is sample data you can enter.
starting date = 01012012
cost = 5870
joint? = n
birth date = 07281941

Your help is GREATLY APPRECIATED!
Don't know why you are helping, but know that you are helping thousands of volunteers.

THANKS!
Kenny
Comment 6 Kohei Yoshida 2014-03-08 16:10:05 UTC
You can Ctrl-Shift-F9 to recalculate, then save the document *just once*. The next time you open it the correct numbers will be displayed.
Comment 7 Joel Madero 2015-05-02 15:43:34 UTC Comment hidden (obsolete)
Comment 8 Grobe 2016-01-04 23:13:33 UTC Comment hidden (no-value)
Comment 9 QA Administrators 2017-03-06 14:24:45 UTC Comment hidden (obsolete)
Comment 10 paulystefan 2018-06-21 21:16:48 UTC
same in win10-64 with LOO 5.4.7.2-64 and LOO 6.0.5.1

only ctrl-shift-F9 works like the versions before.
Comment 11 paulystefan 2018-08-25 10:45:26 UTC
same in win10-64 with LO 6.1.0.3
Comment 12 Timur 2018-08-28 14:33:16 UTC
If I open attachment 93079 [details] in LO 5.2.7, 6.0.6 and 6.2+ I see correct amount ($335) in print.F26 and $27.95 in print.X16.
I don't need recalculation.

I removed Grobe's comment 8 because it's another file. And it's unclear anyway, doesn't say what is seen and expected. 
paulystefan's comment is not clear, what it refers to.

For the sake of efficiency, I'll close as WFM.
If you still reproduce with attachment 93079 [details], please explain.
Comment 13 Timur 2018-08-29 08:06:26 UTC
Note: attachment 121720 [details] is still wrong in 6.2+ but it's either a new bug or I'd rather say Bug 107929. "Recalculation on file load" solves the issue.