Why it takes time cannot be assessed without knowing the details of your SELECT logic. Maybe there are SELECTs that do not appropriately use indexes. Maybe if you analyze the program in debug to find which select is taking the longest, that will point to some solution.
As to the limits of EXCEL, you have to program around that by creating a new file after say every half-million records are written - with file name ending in a sequence like 001, 002, 003 etc. We leave some room for doing further manipulations in EXCEL by limiting to half-million - even that is too big for a spreadsheet to process fast later on.