function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JettaJetta 

How does everyone handle “,” comma within a field in csv file while importing it

Suneel#8Suneel#8
You need to surround that particular data with quotes like below

"Data with , comma"
JettaJetta
Do you want me to surround the data with double quotes in CSV file before upload? I just tried this way and it didn't seem to work.
Suneel#8Suneel#8
Not all the data in a row.You need to surround the data of the particular field which contains , and you dont want it to be treated like a delimiter like below. Did you try this way?

3456,"Bad Part,with a comma",4.56

 
JettaJetta
I am not sure I follow this.. Are you saying padd the quotes after reading the cell value from Apex code while parsing OR before parsing the excel file
Suneel#8Suneel#8
You need to padd the quotes in the csv file before importing them into Salesforce.Salesforce would treat text between quotes as data for single field.Below post is also related to this issue.You can check that as well

https://developer.salesforce.com/forums/ForumsMain?id=906F00000008qZGIAY