df_to_xlsx | R Documentation |
This function adds a data.frame to an excel file, formatting the header. Also allows to select columns where rows with equal values are merged.
df_to_xlsx(
excel_file,
sheet_name,
df,
auto_size_cols = TRUE,
merge_cols = NULL,
nested_merge = TRUE
)
excel_file |
Location of excel file where data.frame will be added |
sheet_name |
Name of the sheet inside the file -will replace sheets with same name- |
df |
Data.frame to be added to file |
auto_size_cols |
Should column width be changed based on their contents? TRUE or FALSE, defaults to TRUE |
merge_cols |
Names of columns that should be merged vertically when they have the same value. Default is no merging, expects a character vector |
nested_merge |
Should merging be done with columns on the right being nested inside the ones on the left? TRUE or FALSE |
Excel file with data.frame added
df_to_xlsx(excel_file = "./excel.xlsx", sheet_name = "information", df = info_df, merge_cols = c("Continent", "Country"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.