Click to See Complete Forum and Search --> : Problem in Writing in CSV


sabaritcs
08-20-2007, 08:16 AM
Hi all,

I am trying to put a long string contains lot of spaces with comma in to a CSV file. the string which i try to put may contain lot of spaces with commas.I am successfully able to write the data in the CSV file but not in a proper format like this.

For Ex:

Emp-No,Address,Name,Manager -------> this is Heading
1000,abcd,name,Man-name -----> After i have to put the data in next line

My String will be like this,

abcd , , , jsjsj, , ,saalkj,jfjfjfjf,mmm,nnn


I am able to get the data properly in the CSV format.

Please help me to solve this. Thanks in Advance!!!!

Khalid Ali
08-20-2007, 05:37 PM
may be I am too tired (end of work day?) but would you please rephrase your question?

sabaritcs
08-20-2007, 11:42 PM
Hi all,

i am retreiving a long String which is not in a proper format (ie) Lot of Spaces in between and my String contains comma(,) seperated and I am trying to put that string in to a CSV file. I am able to write the data in the CSV file but not in a proper format.i need to write the data in the below format.

For Ex:

Emp-No,Address,Name,Manager -------> this is Heading
1000,abcd,name,Man-name -----> After i have to put the data in next line

My String will be like this,

abcd , , , jsjsj, , ,saalkj,jfjfjfjf,mmm, nnn, , ,


I am able to get the data properly in the CSV format.

Please help me to solve this. Thanks in Advance!!!!