I am developing an R shiny app that will generate a sequence of editable charts in an Excel file using the officer package. However, when creating a new .xlsx file using the read_xlsx() function, the file contains a blank first sheet entitled "Feuil1" (apparently the template is in French).
WkBook <- read_xlsx()
WkBook
xlsx document with 1 sheet(s):
[1] "Feuil1"
After adding other appropriately named worksheets to the destination .xlsx file, is it possible to program the app to delete this extraneous "Feuil1" sheet? Officer has an add_sheet() function but doesn't appear to have a function to remove or rename a sheet.
add_sheet(WkBook, "newChart")
xlsx document with 2 sheet(s):
[1] "Feuil1" "newChart"