on 02-22-2008 10:10 PM
I am creating a .csv file from the following data:
<Record>
<field1>Bearing</field1>
<field2>3.2" height, 2.1" weight</field2>
</Record>
Instead of two columns, this creates 3 columns due to the comma in the text of field2.
If I include a mapping to enclose in quotes (") and include a content conversion parameter ( Record.enclosureSign = " ), because there is " in the text, this still splits the text into multiple columns.
How to handle this so that any text in field2 (regardless of special characters) goes entirely into second column of output .csv file?
Hi James,
It will split in three fields as you are using the comma as fieldSeperator and in your output there will be comma between the text of Field2 thus even if its in reality single field, It will look like having the three fields.
Probably you need to handle it while the file is getting read on the receiver end by further application.
OR better way will be to use the field seperator charset which will not be usedin the Output payload.
The characters such as @, #, $ etc but have to make sure that these chars will not be repeated in the Output payload values
Thanks
swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James,
I think its creating two columns only,but as there is ,(comma) in the data it might be looking like three columns.
Bearing,(delimiter)3.2" height,(comma in Data) 2.1" weight
so for looks it is looking like three columnd,but in fact it has two columns.
but in general we have to avoid ,(comma) in data when we are using CSV format.
hope that helps a bit.
Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
James,
Could you paste here the output which u've got?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.