Summary: | Allow multi-character delimiters in CSV import | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Mikhail Novosyolov <mikhailnov> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | 79045_79045, erack, heiko.tietze, ming.v.hua, vsfoote |
Priority: | medium | ||
Version: | 6.4.3.2 release | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=127718 | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 109239 | ||
Attachments: |
Example CSV
Screenshot illustrating the bug |
Description
Mikhail Novosyolov
2020-04-25 19:06:18 UTC
Created attachment 159931 [details]
Example CSV
Created attachment 159932 [details]
Screenshot illustrating the bug
For me, choosing "semicolon" and "merge delimiters" got rid of the empty columns and imported the example CSV file as desired. Can you try this as well? Your report looks as RFE like "Add opportunity to set up any number of symbols as one separator" Mikhail, please give a reply about 1. Does my suggesting in comment #3 solve you problem? 2. Do you want to propose an enhancement about using multiple characters as separator, like Roman said in comment #4? (In reply to Ming Hua from comment #5) > Mikhail, please give a reply about > 1. Does my suggesting in comment #3 solve you problem? Yes, it does, thank you, but it is not obvious at all and I do not catch the logics behind this behaviour > 2. Do you want to propose an enhancement about using multiple characters as > separator, like Roman said in comment #4? I did not understand what Roman meant. If I specify ';;' as A separator (a = one), why does LibreOffice ignore the second ';'? E.g. cat *.csv | awk -F ';;' '{print $1}' works as I want I expected the same behaviour from LibreOffice [Automated Action] NeedInfo-To-Unconfirmed Indeed, discussed before: https://bugs.documentfoundation.org/show_bug.cgi?id=127718#c4 Stuart mentions that any Unicode glyphs can be used as separators. It does work with emojis, but you still need to merge the delimiters. You can escape characters that shouldn't be used as delimiter. Like "Foo;";"Bar";";";"Baz". Plenty of options and I would rather stick to the single character separator to keep things simple and familiar. Consider users complaining why ; doesn't work after unintentionally adding a space after, ie. "; ". => WF Heiko, that does not address the original request that asks to be able to specify a sequence of characters like ';;' two semicolons to be treated as *one* separator, as the original data uses such field delimiter. It's nothing about quoting or escaping extraneous semicolons. The data probably is delimited such to cater for the case where one semicolon could be part of a field content and the generator software is too lazy to quote and escape field content. However, the Merge Delimiters option exactly solves this very problem except the case of a semicolon embedded in field content. If that is really needed then pre-process the data before importing to make it comply with the syntax of RFC 4180 (using any delimiter, not restricted to comma). I'd rather not reimplement everything to allow a delimiter string instead of a delimiter character.. (In reply to Mikhail Novosyolov from comment #6) > If I specify ';;' as A separator (a = > one), why does LibreOffice ignore the second ';'? In the Other input field one can specify a list of single character delimiters, not a string that is used as one delimiter. (In reply to Eike Rathke from comment #11) > pre-process the data before importing to make it comply with the syntax > of RFC 4180 (using any delimiter, not restricted to comma). Yes - exactly. LibreOffice does not need to cater to every conceivable textual data model. Anyone trying to manipulate text data should be able to search/replace with something like a | or whatever will work for their data set. > I'd rather not reimplement everything to allow a delimiter string instead of > a delimiter character.. WONTFIX |