I am trying to parse a csv file and inserting data into custom object. One cell of csv file having comma seprated values. This cell is not getting processed successfully.
public string fieldSetName;
public string fieldSetLabel;
public string fieldSetdescription;
public List<string> fieldSetAvailableFields;
nameFile =blobToString( contentFile,'ISO-8859-1');
//Now sepatate every row of the excel file
filelines = nameFile.split('\n');
for (Integer i=1;i<filelines.size();i++)
{
String[] inputvalues = new String[]{};
inputvalues = filelines[i].split(',');
objectName = inputvalues[0].normalizeSpace();
fieldSetName = inputvalues[1].normalizeSpace();
fieldSetLabel = inputvalues[2].normalizeSpace();
fieldSetdescription = inputvalues[3].normalizeSpace();
for(integer j=4;j<inputvalues.size();j++){
System.debug('******inside the for loop***'+inputvalues[j]); // this showing only first value and getting error - loop should run 3 times to process first row's last cell.
fieldSetAvailableFields.add(inputvalues[j]);
}
}