First Download swc file from the following Link
Link
Now you need to do little bit of work just copy that code and give column names appropriately.
public function roExport_export_Result(e:ResultEvent):void
{
if(e.result.length != 0)
{
btnExportToExcel.enabled = true;
var arrExportResult:Array = e.result as Array;
xlsFile = new ExcelFile();
var sheet:Sheet = new Sheet();
sheet.resize(arrExportResult.length+1,14);
sheet.setCell(0,0,'Id');
sheet.setCell(0,1,'Full Name');
sheet.setCell(0,2,'Gender');
sheet.setCell(0,3,'Birth Date');
sheet.setCell(0,4,'College Name');
sheet.setCell(0,5,'Qualification');
sheet.setCell(0,6,'Email Id');
sheet.setCell(0,7,'Mobile');
sheet.setCell(0,8,'Position Applied For');
sheet.setCell(0,9,'Technology Interested');
sheet.setCell(0,10,'User Name');
sheet.setCell(0,11,'Password');
sheet.setCell(0,12,'Exam Date');
sheet.setCell(0,13,'Percentage');
sheet.setCell(0,14,'IsActive');
for(var i:int=0;i<arrExportResult.length;i++)
{
sheet.setCell(i+1, 0, arrExportResult[i].Id);
sheet.setCell(i+1, 1, arrExportResult[i].FullName);
if(arrExportResult[i].Gender == 1)
{
arrExportResult[i].Gender = "Male"
}
else
{
arrExportResult[i].Gender = "Female";
}
sheet.setCell(i+1, 2, arrExportResult[i].Gender);
var date:String = arrExportResult[i].BirthDate.date.toString();
var month:String = (arrExportResult[i].BirthDate.month + 1).toString();
var year:String = arrExportResult[i].BirthDate.fullYear.toString();
var bDate:String = date + "/" + month + "/" + year;
arrExportResult[i].BirthDate = bDate;
sheet.setCell(i+1, 3, arrExportResult[i].BirthDate);
sheet.setCell(i+1, 4, arrExportResult[i].CollegeId);
sheet.setCell(i+1, 5, arrExportResult[i].QualificationId);
sheet.setCell(i+1, 6, arrExportResult[i].EmailId);
sheet.setCell(i+1, 7, arrExportResult[i].Mobile);
sheet.setCell(i+1, 8, arrExportResult[i].PositionName);
sheet.setCell(i+1, 9, arrExportResult[i].TechForTraining);
sheet.setCell(i+1, 10, arrExportResult[i].UserName);
sheet.setCell(i+1, 11, arrExportResult[i].Password);
var date:String = arrExportResult[i].CreatedDate.date.toString();
var month:String = (arrExportResult[i].CreatedDate.month + 1).toString();
var year:String = arrExportResult[i].CreatedDate.fullYear.toString();
var hour:String = arrExportResult[i].CreatedDate.hours.toString();
var min:String = arrExportResult[i].CreatedDate.minutes.toString();
var sec:String = arrExportResult[i].CreatedDate.seconds.toString();
var cDate:String = date + "/" + month + "/" + year + " " + hour + ":" + min + ":" + sec;
arrExportResult[i].CreatedDate = cDate;
sheet.setCell(i+1, 12, arrExportResult[i].CreatedDate);
sheet.setCell(i+1, 13, arrExportResult[i].Percentage);
sheet.setCell(i+1, 14, arrExportResult[i].IsActive);
}
dataGridResult.dataProvider = arrExportResult;
xlsFile.sheets.addItem(sheet);
bytes = xlsFile.saveToByteArray();
}
else
{
arrExportResult = new Array();
dataGridResult.dataProvider = arrExportResult;
btnExportToExcel.enabled = false;
xlsFile = new ExcelFile();
var sheet:Sheet = new Sheet();
Alert.show("No Records Found",parentApplication.alertTitle);
}
}