I am trying to generate csv file from the list of strings those can contain comma in them, so I am enclosing the string inside quotes to let excel treat the column as text type.
But the strange thing I am facing is, it only works for first column!!! so if I have the text like this
FirstColumn, SecondColumn
"a, b" , secondcolumnvalue
it works as expected and returns me this

but if I try to use this text
firstcolumn, secondcolumn
"a, b" , "c, d"
it returns me this

which is not correct.
I tried many combinations to make it work, like putting more than one quotes pair around the string, putting quotes on comma only etc. but nothing worked for any column other than the first one.
To check if it is not something related to my code I tried creating and checking files manually, but the same result.
Any idea will be appreciable!
Thanks!
Get rid of the spaces between values, so it’s like this:
I don’t know why this works, but (after a bit of testing) it seems it will work if there’s a space before the comma
"a, b","c, d"but not if there’s a space between the,and the"–"a,b", "c,d"– so I’d guess that Excel’s parser is looking for the token,"when looking for quoted entries.