Bug 53026 - Max column width for opening CSV files
Summary: Max column width for opening CSV files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CSV-Import
  Show dependency treegraph
 
Reported: 2012-08-01 06:04 UTC by kees
Modified: 2022-10-20 14:58 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Proposed solution (limited column length) (30.47 KB, image/png)
2021-08-15 18:05 UTC, Andreas Heinisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kees 2012-08-01 06:04:35 UTC
When you open a csv file, it will determine the column width based on the
contents. If there is a lot of text in say the first column (say a couple
of hundred characters), that col will be very wide, often wider than my
screen, which is not so easy to work with.

The way I currently solve this:
- Select all by clicking left top corner of the spread sheet
- Right click on one of the column headers
- Select Column Width - Default value, so that all columns will take on the
default width.

Would be nice if instead, calc would just open csv files using the default
column width (I think ms excel does this), or maybe use a max column width
instead.
Comment 1 Joel Madero 2012-08-02 22:07:38 UTC
I think a max makes more sense, many users (myself included) like that it auto adjusts but I think there should be a max width so that if it's greater than this it either 

a) defaults to default
b) sets itself at the max width.

Marking as NEW as it's confirmed.
Comment 2 Tristan Miller 2012-11-21 10:05:24 UTC
Wide columns being "not so easy to work with" is a bit of an understatement; they trigger some bugs which make it impossible to scroll or resize columns with the mouse.  See Bug 57361.
Comment 3 Ophir LOJKINE 2018-06-27 09:17:24 UTC
I run into this old bug all the time. Are there plans to solve it ?
A single long cell in a CSV file screws up all the formatting. Rather than using a max on all cells width, maybe the width should be set to the 90th percentile of widths, and never be set above a certain threshold.
Comment 4 edonkey2001-libreoffice 2020-04-06 20:23:15 UTC
Bump this bug.
This one is still present in latest LibreOffice.
Comment 5 Timur 2021-03-31 15:13:51 UTC
*** Bug 141380 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Heinisch 2021-08-15 18:05:05 UTC
Created attachment 174301 [details]
Proposed solution (limited column length)

Could this be an acceptable solution? Just limit the amount of shown characters in the columns.
Comment 7 Andreas Heinisch 2021-08-15 18:07:19 UTC
Another solution could be that the length of the string is determined by the first encounter of the end of line, but then the height of the row should be increased.