Issue 97673 - Embedded newlines in .csv files give wrong column width
Summary: Embedded newlines in .csv files give wrong column width
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: open-import (show other issues)
Version: OOo 3.0
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 21:38 UTC by jimavera
Modified: 2013-04-26 12:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---


Attachments
Demo CSV file with embedded newlines in a "text field" (215 bytes, text/plain)
2008-12-30 21:39 UTC, jimavera
no flags Details
Demo CSV file with embedded newlines in a "text field" (215 bytes, text/plain)
2008-12-30 21:40 UTC, jimavera
no flags Details
Screen-shot showing incorrect column width (75.68 KB, text/plain)
2008-12-30 21:43 UTC, jimavera
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jimavera 2008-12-30 21:38:22 UTC
Comma-separated-value (csv) files may contain "quoted fields
with embedded newlines".  When importing into scalc, the width of
the spreadsheet column is set incorrectly to the width of the widest datum
as if the newlines were ordinary characters.

This results in spreadsheet columns which are extremely wide (often much wider
than can be displayed), even though the longest text line is much shorter.

Expected results: The spreadsheet column width should be set according to the
longest line in any cell in the column, taking into account embedded newlines.

I will attach a small .csv file.  To see the problem, open it from scalc.

(Note: Applying 'Optimal Column Width' to the column removes the excess space)
Comment 1 jimavera 2008-12-30 21:39:29 UTC
Created attachment 59086 [details]
Demo CSV file with embedded newlines in a "text field"
Comment 2 jimavera 2008-12-30 21:40:10 UTC
Created attachment 59087 [details]
Demo CSV file with embedded newlines in a "text field"
Comment 3 jimavera 2008-12-30 21:43:03 UTC
Created attachment 59088 [details]
Screen-shot showing incorrect column width
Comment 4 Edwin Sharp 2013-04-26 12:11:52 UTC
Unreasonable width when importing attachment in Rev. 1467605