I want to insert a multiline text data in a CSV field.
Ex:
var data = "\nanything\nin\nthis\nfield";
var fields = "\"Datafield1\",\"Datafield2:"+data+"\"\n";
When I save fields
into a csv file and open it using MS Excel, I get to see only the first column. But when I open the file using a text editor I see:
"Datafield1","Datafield2:
anything
in
this
field"
I don't know whether I am going against CSV standards. Even if I am going against Please help me with a workaround.
Thanks...
By default MS Excel uses semicolon as a separator. use ;
and you'll see this: