Spreadsheet formula error on save/load

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Spreadsheet formula error on save/load

Post by chrisb »

When I enter the following formula in a spreadsheet e.g. in cell A2

Code: Select all

=A1 == 1 ? 1 : (A1 == 2 ? 2 : 3)
I get the result A2 equals A2 for values 1 and 2 and it is 3 for all other values.

Entering this formula removes immediately the brackets. The formula works still as described above.

However, if I save the file and reload it the formula looks like this:

Code: Select all

=(A1 == 1 ? 1 : A1) == 2 ? 2 : 3
which yields different values, e.g. a value of 1 in A1 yields 3 in A2 instead of 1.
I attach a file, but keep in mind, that you get the changed formula on loading.
Attachments
spreadsheetSaveReload.fcstd
(2.84 KiB) Downloaded 24 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Spreadsheet formula error on save/load

Post by ulrich1a »

I can confirm the issue. I made a bug-report: https://freecadweb.org/tracker/view.php?id=3363

The problem exist in the spreadsheet and in expressions, as they share the same library.

Ulrich
Post Reply