for(sObject sObj : scope) {
AggregateResult ar = (AggregateResult)sObj;
Integer IdCount = (Integer)ar.get('cnt');
String accName = (String)ar.get('accName');
if(String.isNotBlank(accName)){
csvRow = accName + ','+ IdCount;
listContactDetail.add(csvRow);
}
}
here is the code where I create the CSV File
Here the problem is when the CSV file is created the field value of accName use the comma(,) like (sunny,roxx) then the created CSV file columns are not assiged
here you see in the image 'mortgage & investment agenct' comes to other columns please give me a suggestion for solved this error thanks in advance