Created attachment 144713 [details] CSV file with IPv4 addresses I have to work with CSV files quite often (reports generated from scripts). I noticed that LO has a serious problem with IPv4 addresses (IPs and subnet masks). Some IPs get imported as they should while others lose the dots. LO shouldn't change the data at all. When I look at the format menu the column is marked as "number" but obviously it cannot be a number if it contains 3 dots, so LO should autoformat as "Text". See attached bugreport.csv. First line is ok, second and third not. Open Dialog, select CSV file, select "semicolon" and leave other settings as default. Works: 10.112.0.171 Does not work: 10111216147 10111216148 For now as a quick workaround my scripts generate CSV with quotes. The quotes get imported into the cells as well, so then I mark all columns as "Text" and do a global search+replace from " to <nothing> but this is quite ugly.
(In reply to Thomas Seeling from comment #0) > When I look at the format menu the column > is marked as "number" but obviously it cannot be a number if it contains 3 > dots, so LO should autoformat as "Text". Obviously it can be a number if your import locale uses a dot as group (aka thousands) separator, which is the case for de-DE German Germany, and the digits are grouped by 3. Select the column in question and choose type Text.
Then it's still inconsistent behaviour because I never wished nor configured for this. Can this autoformatting be switched off? It's not a solution to set my locale to something else. Is there a setting in the open dialog where I can switch it off? The checkbox for "recognize special numbers" is not ticked. The data is already destroyed before I even get the chance to format the column as "Text". I'm not happy that this bug report has been closed so quickly. I can understand the explanation of "dots" as triplet separator for numbers but I'd like to have an option to ignore and not do any magic during import.
No repro for me with: Version: 6.0.6.2 Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77 Threads CPU : 8; OS : Mac OS X 10.13.6; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group Drag and drop the CSV file to a running instance of LibreOffice. The CSV import wizard opens. Choose semi-colon as separator. Default option of number recognition is active. In the display in Calc, the IP column displays the correct results after import.
@Thomas : is this a distrib-provided version of LO, or did you install from the TDF download page ?
Can confirm. Version: 6.1.1.1 (via Debian Testing) Build-ID: 1:6.1.1~rc1-2 CPU-Threads: 4; BS: Linux 4.17; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-DE (de_DE.utf8); Calc: group threaded When importing as de-DE it breaks the second and third IP address. But when importing as en-GB everything is as expected.
To clarify: When changing to en-GB in the import dialogue. The application was running as de-DE as with the first import.
(In reply to lightonflux from comment #5) > Can confirm. > > Version: 6.1.1.1 (via Debian Testing) > Build-ID: 1:6.1.1~rc1-2 > CPU-Threads: 4; BS: Linux 4.17; UI-Render: Standard; VCL: gtk3; > Gebietsschema: de-DE (de_DE.utf8); Calc: group threaded > > When importing as de-DE it breaks the second and third IP address. But when > importing as en-GB everything is as expected. That is not a "bug" confirmation rather, it is the CSV import filter correctly responding for a column with "Standard" logic to what is a valid number. Correct usage is to change the field to Text as there is no other pattern recognition in Standard to hand IPv4 or IPv6 notation. In other words, if the locale would make it a number--use the CSV import dialog to correct the column type! => NAB
A closing sidenote, yes it would be a feasible enhancement to implement filter(s) in the CSV import Standard mode to include IPv4 or IPv6 notation that overrides locale. But, issue here is clearly one of usage and is not a bug in the CSV import dialog.
Ok, I was not aware that I can change the column type in the import dialog. I can rightclick on my IPv4 column and change it to "Text". So the locale doesn't matter at all. That works for me. Thanks for your patience.
Is a help text in order? Some small text that tells the user that the columns below are interactive elements. I think this is especially important for people with Excel experience. AFAIK in Excel it is only a preview. And it says so.
(In reply to lightonflux from comment #10) > Is a help text in order? > > Some small text that tells the user that the columns below are interactive > elements. > But the "Fields" and "Column type" preview panel has *always* been interactive (inherited from OOo) the current help (master/6.2) for the dialog is available here: https://help.libreoffice.org/6.2/en-US/text/shared/00/00000208.html?System=WIN&DbPAR=CALC#bm_id3155934 Don't see much need for a "tool-tip" that a mouse over and context menu provides. > I think this is especially important for people with Excel experience. AFAIK > in Excel it is only a preview. And it says so. No, Excel's Text Import Wizard also goes interactive, allowing to set General-Text-Date-or Skip, in its final steps. The OOo/LibreOffice UI is much more direct.