camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Ravindra.Godb...@cognizant.com>
Subject RE: How to Add Double quote at the beginning of the column using Camel Bindy
Date Wed, 02 Jul 2014 16:37:57 GMT
Hi

Have you tried following option ?

@CsvRecord ( separator = ",",generateHeaderColumns=true,quoting=true)

By deafult, " is the quote value. This will take care of all the values with quotes with ','
as seperator.

If you also want same behavior with column headers, you have to do something like this in
the POJO annotations.

        @DataField(pos = 3 , columnName = "\"Employee Id\"")
        String id;



-Ravi

________________________________________
From: Jaishankar [jayashankar.c43@wipro.com]
Sent: Tuesday, July 01, 2014 5:25 PM
To: users@camel.apache.org
Subject: How to Add Double quote at the beginning of the column using Camel Bindy

I'm creating csv file using Camel Bindy.
In bindy model I have used @CsvRecord( separator = "\",\""
,generateHeaderColumns=true), if I use this the output file is
EMPLOYEE ID","SURNAME","FIRST NAME","SECOND NAME
but I need output as
"EMPLOYEE ID","SURNAME","FIRST NAME","SECOND NAME"

The problem is start and at the end of the column double quote is missing.
Please help me out in resolving this problem.




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-Add-Double-quote-at-the-beginning-of-the-column-using-Camel-Bindy-tp5753141.html
Sent from the Camel - Users mailing list archive at Nabble.com.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information. If you are not the intended recipient(s),
please reply to the sender and destroy all copies of the original message. Any unauthorized
review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or
any action taken in reliance on the contents of this e-mail is strictly prohibited and may
be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications
sent to and from Cognizant e-mail addresses may be monitored.

Mime
View raw message