Packages to write into Excel files
In this section, we are going to go over a few different libraries that we can use to write data.frames
/tibbles
to Excel files. We are going to use the writexl
, openxlsx
, and xlsx
libraries.
In the following section, we are going to list each package, specify where you can find the function documentation that writes the data to Excel, and go over the functions’ parameters.
writexl
The writexl
package is part of the rOpenSci consortium and can be found here: https://docs.ropensci.org/writexl/reference/write_xlsx.html.
The library does not require Java or Excel to work.
The function that writes the data to Excel is write_xlsx()
. Let’s go over the different parameters of the function and look at a full pseudo function call.
First, let’s look at the function call itself – that is, write_xlsx()
:
write_xlsx( Â Â x, Â Â path = tempfile(fileext = ".xlsx"), Â Â col_names = TRUE...