I suggest you wrap your logic in a loop container. Logically, it would look like this:
- Count the number of rows ready to export to excel. Divide by 1000, round up and set as a variable. (EX. 5049 rows -> 6)
Have a loop container loop on the new variable.
- Within the loop, select the subset of rows by adding a row number to the query (make sure its ordered...) with something like
row >= (<variable>-1)*1000 AND row < (<variable>)*1000
- You can use an expression to name the file with the variable appended to the end to give a unique name. EX.
"<filename>_" + DT_WSTR <variable> + ".xls"
to get something likedataset_1.xls, dataset_2.xls...
- Within the loop, select the subset of rows by adding a row number to the query (make sure its ordered...) with something like