Bug 66588 - UI: prevent confusing: disable the choice "Fixed column width" when saving a sheet in CSV with "Save cell formulas instead of calculated values"
Summary: UI: prevent confusing: disable the choice "Fixed column width" when saving a ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Column-Limitations
  Show dependency treegraph
 
Reported: 2013-07-04 14:54 UTC by robert
Modified: 2017-07-18 04:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test.odt and save-as test.csv (22.56 KB, application/zip)
2013-07-04 14:54 UTC, robert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert 2013-07-04 14:54:32 UTC
Created attachment 82029 [details]
test.odt and save-as test.csv

When saving a sheet to CSV format, selecting "Save cell formulas instead of calculated values" and "Fixed Column width", the resulting CSV file will (or at least so it seems) truncate formulas  at a length of 8 characters.

The attached zip contains an .ODT file and the .SV file resulting of saving it in CSV format.
Comment 1 m_a_riosv 2013-07-04 23:27:34 UTC
Hi robert, thanks for reporting.

If you enable Fixed Column width the all data are truncated to width of the column where they are. Disable it, and the all formula is saved.

CSV is a plain text format, no possible to save a data longer than 8 characters in a column with a 8 characters width without truncate.

You can ask for help in http://ask.libreoffice.org/en/questions/ or in the user mailing list http://nabble.documentfoundation.org/Users-f1639498.html

Change the status to resolved notabug, if you are not agree please reopen it.
Comment 2 robert 2013-07-05 05:54:46 UTC
I'm sorry to say, but this is a bug. A formula is not data and should NEVER EVER EVER be truncated to the width of the resulting data, take for example a 42 character complex "=IF()" one that result in a one-character result. Truncate it to 1 character and the saved-in-CSV format sheet no longer bears any resemblance to the original one.

Reopened, THIS IS A BUG, no matter how you try to weasel your way out of telling it isn't!
Comment 3 Cor Nouws 2013-07-05 07:27:44 UTC
(In reply to comment #2)
> I'm sorry to say, but this is a bug. A formula is not data 

csv is text, so there is no distiction in whatever content.

> Reopened, THIS IS A BUG, no matter how you try to weasel your way out of
> telling it isn't!

Hmm, thought we could try to be more polite here ;)

I don't know your use case, Robert, but probably there are better ways to get to where you want?
Cheers,
Cor
Comment 4 m_a_riosv 2013-07-06 11:24:59 UTC
Hi Rober, I guess you are a great donor to LibreOffice project and for sure I have not enough skills about CSV files to comment about it, with a person like you with a so high level of knowledge on the matter. Please forgive me.
Comment 5 Luuk 2013-07-06 11:43:19 UTC
I think the best option is to disable the choice "Fixed column width" after enabling the choice "Save cell formulas instead of calculated values"

Because it does not make sense to store formulas in a fixed column width.
Comment 6 Cor Nouws 2013-07-30 21:10:58 UTC
(In reply to comment #5)
> I think the best option is to disable the choice "Fixed column width" after
> enabling the choice "Save cell formulas instead of calculated values"
> 
> Because it does not make sense to store formulas in a fixed column width.

Sounds as a good suggestion to me!
Comment 7 robert 2013-07-30 21:48:01 UTC
> I think the best option is to disable the choice "Fixed column width" after
> enabling the choice "Save cell formulas instead of calculated values"
> 
> Because it does not make sense to store formulas in a fixed column width.

That's a solution, but I think it's a rather simplistic one. If you look at the CSV in the attached .ZIP, you will see that many columns are wider than required. Why could it not be possible for columns that contain a formula to make that particular column as wide as the longest formula?
Comment 8 Luuk 2013-08-01 18:11:57 UTC
Formula's can be really long.....
Do you know the CTRL+` function? It shows all formula's in stead of the values.
After this you can change column width to the max width needed.