If you send the data as CSV to the browser (i.e. implode() each entry in the result set array with \t and separate each line with \n), Excel can easily convert it to something it can use when the document is loaded.
But note, you must tell the browser that the document it's loading is an excel file so it knows to use excel to load the file. Do so by providing a content type and content disposition header like so:
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition: attachment; filename=exportExcel.xls");
Please make sure you call the header() functions before you send the CSV'd text.
Note: I chose \t (tabs) to separate each field rather than commas because in my experience, they've caused issues as it might be common for a field to contain commas in it... but perhaps not in your particular case.