Glad it works, but it's a shame to have to change over to 32-bit Qt app just to be able to talk ODBC to Excel.
If you want to pursue this further I think it is a non-Qt issue. You would have to Google for something about how to ODBC from a 64-bit executable when I have such-and-such (probably 32-bit) Excel, or similar.
You can use QSqlQuery to run the select statements and loop the resultset with next() like in VRonin´s example. If you comma seperate the columns like in VRonin´s example you can open this file in excel.
One more option, if your on windows is to use ODBC Excel Driver to generate the Excel file. With this you can use QSqlQuery to create tables and insert rows.