I am facing the similar issue, (Moodle 2.5.2)
1. The file first did not download it displayed a url error (404), I then changed the
$worksheet = $workbook->add_worksheet(''); to $worksheet = $workbook->add_worksheet('export');
in moodle/admin/user_bulk_download.php, which resolved this error and downloads the excel file.
2. However, the downloaded xlsx file is not opening in Excel and when opening it in the text editor has the same gibberish format as stated earlier in this thread.
3. I tried with downloading the CSV format, it works fine, however the Spanish characters are not encoded properly.
So, I am a bit stuck with this, any advice would be greatly appreciated.