I have a group of data from excel file read the file and take the result in a variable for create a new excel with what are wrong and i try
local.sheetData =queryNew("FirstName,LastName,Address,Email,Phone,DOB,Role");
for(row in data){
queryAddRow(local.sheetData);
if(row["First Name"] != '' || row["Last Name"] != '' || row["Address"] != '' || row["Email"] != '' || row["Phone"] != '' || row["DOB"] != '' || row["Role"] != ''){
if(row["First Name"] === '' || row["Last Name"] === '' || row["Address"] === '' || row["Email"] === '' || row["Phone"] === '' || row["DOB"] === '' || row["Role"] === ''){
local.endresult = arrayToList(local.nullMessage)
querySetCell(local.sheetData, "FirstName", row["First Name"]);
querySetCell(local.sheetData, "LastName", row["Last Name"]);
querySetCell(local.sheetData, "Address", row["Address"]);
querySetCell(local.sheetData, "Email", row["Email"]);
querySetCell(local.sheetData, "Phone", row["Phone"]);
querySetCell(local.sheetData, "DOB", row["DOB"]);
querySetCell(local.sheetData, "Role", row["Role"]);
}else{
querySetCell(local.sheetData, "FirstName", row["First Name"]);
querySetCell(local.sheetData, "LastName", row["Last Name"]);
querySetCell(local.sheetData, "Address", row["Address"]);
querySetCell(local.sheetData, "Email", row["Email"]);
querySetCell(local.sheetData, "Phone", row["Phone"]);
querySetCell(local.sheetData, "DOB", row["DOB"]);
querySetCell(local.sheetData, "Role", row["Role"]);
}
}
}
return local.sheetData;
it working fine and get the result like
i wand sort this query and show the any cell is empty that row show first. how to sort the query in coldfusion ?

dataalready is a query object in your case? How doesWriteDump(data)look like?local.sheetDatalooks like. I asked whatdatalooks like.