I have a CSV with lines in the form of:
A0050,VP 2015-01,P301,ASR Schadeverzekering N.V.,02500,auto,Motor,02008,Wettelijke Aansprakelijkheid,02001,303,144,447,m,x,x,x
As not all fields are properly quoted, data like "02500" is automatically converted to "2500" as a number. It doesn't seem possible to ask Calc to leave everything as text or some other manual tweaks to prevent loss of data in a case like this.
I am quite sure that in 6.x checking "format quoted fields as text" also left this data untouched as text, as I've imported data in this form before.
A definite issue:
- the preview part of the CSV import shows my data correctly (eg 02500 instead of 2500), however after the import it becomes 2500 with no possibility of preventing this.
Steps to Reproduce:
1. Have a CSV file in the form described above
2. Open it
3. Observe the data preview
4. complete the import and observe the same data
preview data: "02500"
after import: "2500"
1. preview data consistent with data after import
2. have an option to not convert data at all (eg: leave everything as text)
User Profile Reset: No
Expected result #2 is more of a feature request, it would definitely be useful
You simply need to spend some time setting up the Text Import dialog.
Each field (a 'comma' separator in your text line) can be set as to handling it needs. The import settings will reapply next usage--or you can save it and reuse. Help is here , or check the Calc guide or Getting started guide.
Set the 'comma' delimiter, and then assign Column types for each field. Should clear things up for you. If so, please close out this BZ issue.
yes, that's part of the issue. So I either need to tweak the handling of columns every time I do an import or save it to be used every time automatically.
Neither is a practical choice, as while I do these kinds of imports often enough that the first option is not practical (I have things with dozens of columns) I also definitely don't want to save a preset to be applied all the time.
So there are 2 points:
- it would be great to have the option to "don't covert anything" as a checkbox
- the import preview is still not working as a preview (although it says it's a preview, it doesn't show the outcome as my columns don't appear converted leaving the impression they won't be)
(In reply to Andrei from comment #0)
> Expected Results:
> 1. preview data consistent with data after import
Solution given in comment #1. Note that the case of numbers with leading 0 like phone numbers is explicitly mentioned in the help.
> 2. have an option to not convert data at all (eg: leave everything as text)
I think that is not a so good idea because CSV are mainly used for numbers, not for text, and there is probably very few examples of CSV files without numbers.
So, even you have 100 columns of text, it is enough you have 1 column of numbers, to make this option useless.
Note that this option would be useless for a CSV file with the kind of data given in the bug description.
So I close this bug report as worksforme. Please feel free to reopen if you disagree. In that case thank you for adding arguments.
Best regards. JBF