Creating a separate save data file for a component

I am using a textbox component within my study. This particular component, has been coded in a way that it is gathering data such as saving each letter that was pressed and the onset timing of each letter. As you can imagine, this is a lot of data, especially when the participant is expected to write a large amount of words. So what I would like to do is to save the data from this particular textbox component into its own excel file separate from the other saved data so as not to have everything so cluttered. Is this at all possible? I would expect it would involve adding a code component within the routine of the textbox.

Within this routine, I would like to save all the data gathered (keyboard response (information typed into the textbox component)) (see image below) in a separate excel/csv file that saves each individual key press (such as the final image below).