I want to format tables in xlsx format and save to xlsx file, and convert third column in percentage value.
mtcars
df <- mtcars[1:5,1:5]
df <- janitor::adorn_totals(df)
wb <- loadWorkbook("blank_template.xlsx")
addWorksheet(wb, "tables")
writeDataTable(wb, "tables", df, tableStyle = "TablestyleMedium6")
I want to format a table like below and save it to an xlsx file.
CodePudding user response: