Bug 151942 - CSV document create new sheet erases the old sheet
Summary: CSV document create new sheet erases the old sheet
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-07 10:51 UTC by David ISAL
Modified: 2024-04-16 11:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David ISAL 2022-11-07 10:51:57 UTC
Description:
this bug caused for me a loss of data,
I reproduced it with libreoffice version:

Version: 7.4.1.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Debian package version: 1:7.4.1-2
Calc: threaded

When I create a new CSV document, insert and save data,
if I insert a second sheet and saves and exit the document,

when loading the file on disk the first sheet has disappeared, replaced by the new one. this also happens for .xlsx documents loading data of "CSV" format.

Steps to Reproduce:
1. create a csv document insert data on the first sheet.
2. insert a second sheet with other datas and save & exit.
3. load the CSV document again. first sheet has disappeared.

Actual Results:
data erased by new sheet creation.

Expected Results:
protection of the datas.


Reproducible: Always


User Profile Reset: No

Additional Info:
I suppose this is quite serious and should be fixed as it can cause loss of datas for users.
Comment 1 Mike Kaganski 2022-11-07 11:28:21 UTC
This is not a bug.

CSV format is just a comma-separated text format, which cannot store several sheets at all. It is normal that any feature unsupported in the chosen format is lost.

LibreOffice warns you by default when you save to any external format (i.e., non-ODF), telling that formatting and data might be lost. Ignoring that warning, or even disabling it (unchecking "Ask when not saving to ODF or default format" checkbox in the warning dialog) and then loosing data is user error.

You may check if you had disabled that warning once (e.g., because you incorrectly believed it's useless), at Options->Load/Save->General, "Warn when not saving to ODF or default format" checkbox.
Comment 2 David ISAL 2022-11-07 12:34:58 UTC
hello, Mike

and thank you for the rapid answer!

I should disagree with you,

Yes this is not a dev bug of libreoffice,
and I have checked the same behaviour with M$ Office:
creating antoher sheet erase the first one with CSV.

However I think this is a functional bug as users can destroy data inadvertedly.
So, maybe this should be taken into account.
Comment 3 m_a_riosv 2022-11-07 18:40:22 UTC
I find @Mike answer clear enough, about there is no way to save several sheets in CSV format.

But it's easy having the data in an ODS file, and use Menu/File/Save a copy to get the CSV without destroy the file with the data.
Comment 4 David ISAL 2024-04-16 11:39:42 UTC
Hello Mike Kaganski, Miguel Angel RV,

I agree with you when you say: "

CSV format is just a comma-separated text format, which cannot store several
sheets at all"

Ok, this is not a bug as it follows the CSV protocol.

But, I should disagree from the user point of view, as it permits to easily loose your documents with a normal usage of Open Office.

So I suppose this should be an added functionality, handled by OpenOffice, to prevent users from loosing their files.

Just my opinion though. :p
Comment 5 David ISAL 2024-04-16 11:42:03 UTC
You can close the bug request anyway,

the point is just , I suppose a software like libreOffice should take care of possible users miss-actions and prevent any erasing of their datas (whatever the CSV format).