Use macro to create excel workbook with a new sheet for a different person

Hi, first post for me! I was wondering if there is a way to use a macro that would create an excel workbook with a new sheet for a different player. This is what I have so far....

library(writexl)
ExlMac <- function(var){
var <- WFC_GPS_2019[WFC_GPS_2019$Player == var, c(1:13)]

wb <- createWorkbook()
addWorksheet(wb, var)
addWorksheet(wb, var)
writeData(wb, 1, WFC_GPS_2019$Player = var)
saveWorkbook(wb, file = "~/Dropbox/Data Analysis for Sport in R/Workspace/Player GPS files/varGPS.xlsx", overwrite = TRUE)
}

ExlMac("Player1")
ExlMac("Player2")

I have my full dataset being WFC_GPS_2019 and I want to extract from this by player name

Please help!