Automation - How to export "Execute Script" results to file?

Hello,

See screen shot below for an overview of my automation script. I am trying to export the result set of the "Execute_1" activity, without re-running the same query in the "File_1" Select to File activity.

In the sequence shown below, "Execute_1" runs a query using a loop data set. The resulting set is run through an If statement, which checks whether the result set is empty or not (rowcount > 0). If it is not empty, it will be exported to an Excel file. It would be nice if I could simply use the same result set for the Select to File activity, instead of re-running the same query. Is there a way to do this?

Thanks in advance,

David