Need script to split and export the results to multiple workbook

Hello Team,

I have a stored procedure to execute the data from data base and I have executed it but it as more than million rows, I need the script to export it to multiple workbooks with the specific row ranges.