I found a solution, which works alright. It works with the win32com client though, so I think, that it only works on Windows. But maybe it helps someone. It adds "number_of_rows"-rows after the "start_row"-row:
insert_empty_rows <- function(filename, sheet_name, start_row, number_of_rows){
# create an instance of Excel
excel_app <- RDCOMClient::COMCreate("Excel.Application")
# hide excel
excel_app[["Visible"]] <- FALSE
excel_app[["DisplayAlerts"]] <- FALSE
# open workbook
wb_rdcom <- excel_app$Workbooks()$Open(filename)
ws_rdcom <- wb_rdcom$Sheets(sheet_name)
# insert lines
for (. in 1:number_of_rows){
ws_rdcom$Rows(start_row + 1)$Insert()
}
# save and close workbook
wb_rdcom$Save()
wb_rdcom$Close()
excel_app$Quit()
# clean up
rm(excel_app, wb_rdcom)
wb_rdcom <- NULL
excel_app <- NULL
gc()
}