Bug 133756 - Saving an CSV containing formula's erases formula's
Summary: Saving an CSV containing formula's erases formula's
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: dataLoss
Depends on:
Blocks: CSV-Export
  Show dependency treegraph
 
Reported: 2020-06-07 15:12 UTC by Telesto
Modified: 2022-09-06 23:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file (997 bytes, application/vnd.ms-excel)
2020-06-07 15:12 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-06-07 15:12:07 UTC
Description:
Saving an CSV containing formula's erases formula's 

Steps to Reproduce:
1. Open the attached file
2. Column C F & I contain formula's
3. Save & Reload 

Actual Results:
Formula's gone

Expected Results:
Should still be around


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 191288d6a7fb52b31038a21c4e71ee57ffa3bacd
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-06-07 15:12:26 UTC
Created attachment 161726 [details]
Example file
Comment 2 Telesto 2020-06-07 15:17:02 UTC
Also in
3.5.7.2
Comment 3 Roman Kuznetsov 2020-06-07 16:46:51 UTC
I confirm the data loss, but Telesto, where did you get that CSV file from? MS Office?

Version: 7.1.0.0.alpha0+
Build ID: 2047a5978ac8188e61da9cd3b2f40d86df5570bb
CPU threads: 4; OS: Mac OS X 10.15.5; UI render: default; VCL: osx
Locale: en-US (ru_RU.UTF-8); UI: en-US
Calc: threaded
Comment 4 Buovjaga 2020-06-07 17:00:53 UTC
You have to use Save as and in the dialog "Edit filter settings" and consult the options related to formulas there.
Comment 5 Roman Kuznetsov 2020-06-07 17:03:26 UTC
(In reply to Buovjaga from comment #4)
> You have to use Save as and in the dialog "Edit filter settings" and consult
> the options related to formulas there.

So, is it NOTABUG?
Comment 6 Buovjaga 2020-06-07 17:08:03 UTC
I don't know, how it could be implemented (to somehow save temporary state about a certain opened CSV file containing formulas). I would say it is dangerous, if we go changing the default behaviour. I would assume people want to save values by default, when exporting to CSV.
Comment 7 Telesto 2020-06-07 17:30:00 UTC
(In reply to Buovjaga from comment #6)
> I don't know, how it could be implemented (to somehow save temporary state
> about a certain opened CSV file containing formulas). I would say it is
> dangerous, if we go changing the default behaviour. I would assume people
> want to save values by default, when exporting to CSV.

The default shouldn't be changed.. ideally.. imported with formula's saved with formula's.. Or the save button should be disabled.. 

It's awfully weird to open CSV with formula's (created by LibreOffice BTW), and press save -> still seeing formula's and loosing them after -> File -> Reload 

The state is not desired either, IMHO
Comment 8 QA Administrators 2022-06-08 03:31:29 UTC Comment hidden (obsolete)
Comment 9 Mike Kaganski 2022-08-31 05:57:20 UTC
CSV is ideally a data-only datatype-agnostic file format. Having formulas in it is an extension, and is considered a security issue (see bug 114878).

Having unsupported data and formatting lost on save to external format is expected and normal; not having this data lost in the current UI is also OK (the same would happen in Writer, when you save tables and headers and footnotes and bolds to a TXT file, and not see the loss until you reload). LibreOffice does not reload automatically on save - it also helps when one changes their mind, and decides to save to native format (or undo, or whatever) - reloading would make all that impossible.

So no, there's no bug, nothing to change, and the defaults are fine. Change filter settings on save explicitly to enable saving formulas.
Comment 10 Eike Rathke 2022-09-06 23:08:40 UTC
Fwiw, since LO 7.3 there is a CSV import option whether to evaluate formulas as formulas or import them as text. See https://wiki.documentfoundation.org/ReleaseNotes/7.3#General_improvements_2