on 2022 Mar 17 5:55 AM
Hi All,
Can you please help with the FCC parameters to read the below CSV format file?
"AAA,BBB,"1111,2222,3333", DDD, EEE, FFF"
No of fields : A,B,C,D, E,F and the line starts and ends with " and also in between we have fields with comma separated within double quote.
I gave the parameter
Record.enclosureSign "
Record.fieldSeparator ,
Record.endSeparator 'nl'
Record.fieldNames
but this is taking the complete row in the first field
and if i don,t mention this Record.enclosureSign " then this "1111,2222,3333" splitting into 3 fields.
Can you please advise how can ignore the " in the beginning and end of the line and also achieve non splitting of this field 1111,2222,3333"
Thanks,
I would make a bold statement and say the CSV is not (very) well formed, see https://datatracker.ietf.org/doc/html/rfc4180
If you can, try to persuade the provider of the CSV to not have double quotes at line start and line end but either have 'em on each field or only have it on field C ("1111,2222,3333")
If it is not possible to influence the CSV, you may want to consider the following options
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.