# output formatting – Writing strings containing commas to .csv files

The following:

``````filepathandname="C:testfile.csv";
stringtowrite="Peter just called to say, he saw a slug, eating a chip !";
WriteString(filepathandname, StringJoin(stringtowrite,"n"));
Close(filepathandname)
``````

writes a comma separated value file which can be opened e.g. in Excel.

The 2 commas in the string of text act (unsurprisingly) to separate the text into 3 columns.
I would like all the text to appear in a single column, in fact, in the top-left cell of the file as viewed in Excel.

If I open a new document in Excel, I can write in a cell some text containing commas, then save the file as a .csv file. When I reopen the file in Excel, it understands that I did not mean those commas as delimiters. This is the effect I hope to reproduce in my files written by Mathematica.

Is there a way to achieve this, while sticking with the .cvs file format ?