I experienced the same in our 2.3 Moodle today. I wanted to get the names of the students from a course that was hidden but had 1 assignment task but without any results yet. I tried to Excel export - the resulting file was seemingly empty but its size was 21KB. I looked into the file and could see lots of "NUL"s and other codes but no real data. The export worked in all other formats (text, XML, open doc) and showed the list of all students in the course.
When I tried including the feedback in the export, this trick solved the original problem: the names appeared in the Excel file. I had this problem in all my courses that had no results yet and this trick worked in all cases.
BTW, do you have any idea how to get the list of students in a course other than exporting the gradebook?