|
From: | Alan Mead |
Subject: | Re: Import CVS with carriage return inside double quotes |
Date: | Fri, 22 Feb 2019 12:15:57 -0600 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
Matteo, You replied back to me:
And: Libreoffice Calc import the file without problem And included the attached file (which I've renamed to have a .csv extension). You reported that it opens fine in LibreOffice Calc, but when I import it, I get the same, incorrect, results: The problem inherent in CSV (comma separated values) is that it's not really a format. When I examine your file, it's clearly not using comma's to separate values: I think it would be fastest to fix your data, but it looks like PSPP supports "qualifiers" when reading delimited data and you could play with that to see if you can coax PSPP into reading the file correctly: 9.4.3.1 Reading Delimited DataGET DATA /TYPE=TXT /FILE={’file_name’,file_handle} [/ARRANGEMENT={DELIMITED,FIXED}] [/FIRSTCASE={first_case}] [/IMPORTCASE={ALL,FIRST max_cases,PERCENT percent}] /DELIMITERS="delimiters" [/QUALIFIER="quotes" [/DELCASE={LINE,VARIABLES n_variables}] /VARIABLES=del_var1 [del_var2]… The optional QUALIFIER subcommand names one or
more characters that can be used to quote values within fields in
the input. A field that begins with one of the specified quote
characters ends at the next matching quote. Intervening delimiters
become part of the field, instead of terminating it. The ability
to specify more than one quote character is a PSPPextension.If you go that route and have trouble, posting your syntax would be most helpful. -Alan On 2/22/2019 11:15 AM, Matteo Ga wrote:
-- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers http://www.alanmead.org "You're an interesting species. An interesting mix. You're capable of such beautiful dreams, and such horrible nightmares. You feel so lost, so cut off, so alone, only you're not. See, in all our searching, the only thing we've found that makes the emptiness bearable, is each other." -- Carl Sagan, Contact |
nocr.csv
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |