Bug 88798 - CSV import includes "past" quote characters
Summary: CSV import includes "past" quote characters
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-25 23:50 UTC by robert
Modified: 2020-10-09 19:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (34.92 KB, image/png)
2015-01-26 01:30 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert 2015-01-25 23:50:30 UTC
When importing a CSV file, and a trivial example is

"One"    , "Two"  , "Three"

where the blanks are not significant, but the result of the file being generated by PL/I on a z/OS system, the import with the options

Separator Options

Separated by **CHECKED**
Comma **CHECKED**

Text delimiter "

Other options

Quoted field as text **CHECKED**
Detect special numbers **CHECKED** (irrelevant here)

The file will be imported, but the spaces between the quotes at the end of "One" and "Two" and the subsequent comma will be imported, and this is very annoying, as only the quoted text should be imported.
Comment 1 m_a_riosv 2015-01-26 01:30:13 UTC
Created attachment 112800 [details]
Screenshot

Hi @robert, thanks for reporting.

Marking also space as delimiter and the option for Merging delimiters, works fine for me in Text-to-columns.

Please test and report.
Comment 2 robert 2015-01-26 08:35:22 UTC
(In reply to m.a.riosv from comment #1)
> Created attachment 112800 [details]
> Screenshot
> 
> Hi @robert, thanks for reporting.
> 
> Marking also space as delimiter and the option for Merging delimiters, works
> fine for me in Text-to-columns.
> 
> Please test and report.

Yes this works indeed, and I will use it in the future, but it's absolutely not obvious, some info, or an option, like "Stripping trailing blanks in text fields", with corresponding entries in the Help to explain this might/would be useful.
Comment 3 m_a_riosv 2015-01-26 21:07:21 UTC
Sorry @robert, maybe I'm wrong but I never see a CSV with those spaces out of quotes.
Comment 4 robert 2015-01-26 21:12:55 UTC
Try creating a  CSV file in a language like COBOL or PL/I, which are very much record oriented with fixed-length fields.
Comment 5 m_a_riosv 2015-01-27 01:43:37 UTC
@robert, I'm not a developer now, more than thirty five years last time I did something in Cobol.

If you like please fill a bug as request for enhancement (second field or importance), IMO there is a simple solution, without special tricks.

Not only this one, there are a lot of options not enougth explained in the program. But you know is funny find out new ways. There is always something new to learn.:)