CSV - Sentences with comma's
Posted: Thu Oct 06, 2005 11:45 pm
Hi All,
I'm trying to export a CVS and have coem across a glitch.
The user has used comma's in a sentence and it has been saved into the DB.
When I export as CSV the comma triggers evrything after it to move one space left.
(Obviously how it should work!)
How would encapsulate the comma in the sentence and avoid excel/OOffice from using it?
Here's how i'm creating the code :
Tks, Will.
I'm trying to export a CVS and have coem across a glitch.
The user has used comma's in a sentence and it has been saved into the DB.
When I export as CSV the comma triggers evrything after it to move one space left.
(Obviously how it should work!)
How would encapsulate the comma in the sentence and avoid excel/OOffice from using it?
Here's how i'm creating the code :
Code: Select all
echo "$colloPaperName,", "$paperCategory\n";