That is very elegant. Hadn't expected something that neat.
I can now replace my clunky for loop and just process a single, giant df.
#get list of excel XML files from the directory
#root - user directory
#client - client directory name
file_list<-list.files(path=str_c(root,client,sep="/"),pattern="*.xlsx")
#function for importing and processing files goes here
#requires client directory name, file name for import
#output is "import_TT" tibble
#Create Output_Table to hold the additions of imported files
Output_Table<-tibble()
#Call import function for each excel workbook to import
#Create output table by concatenating processed tables
for(i in 1:length(file_list)){
Output_Table<-bind_rows(Output_Table,import_TT(client,file_list[i]))
}
#Export the table to an excel workbook naming it after the first workbook in the list
fileloc<-str_c(root,client,str_c("TT_Processed",file_list[1],today(),".xlsx",sep="-"), sep="/")
write_xlsx(Output_Table,fileloc,format_headers = TRUE,col_names = TRUE)