This function is not needed use xlsx::write.xlsx() directly But developing the function below might be usefull
1  | savedtf2excel(dtf, filename, path = "data-raw/")
 | 
dtf | 
 data frame  | 
filename | 
 name of the excel file  | 
path | 
 folder where the file will be saved Todo: could use deparse(substitute(dtf)) to create a filename from the objects name this might not be needed, as the ?xlsx explains write.xlsx(USArrests, file="file.xlsx")  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.