I am uploading CSV file using email service functionality of salesforce.
Scenario 1) When I try to upload a file without comma in any column, It gets uploaded without any error.
Scenario 2) When I try to upload a file with comma present inside column, It copies the data to the next column because of commas.
The error is coming on column no 9:
Apex Class Snippet:
if (csvAsStringRowElement.size() > 0 && csvAsStringRowElement[9] != null && csvAsStringRowElement[9].trim().length() > 0) {
acc.PersonMailingStreet = csvAsStringRowElement[9].trim();
System.debug('Street----->'+acc.PersonMailingStreet);
}