ropensci / writexl

Portable, light-weight data frame to xlsx exporter for R
https://docs.ropensci.org/writexl
Other
209 stars 17 forks source link

Add an append option #29

Closed Lornebradia closed 5 years ago

Lornebradia commented 5 years ago

Would it be possible (I don't know the original libxlsxwriter library) to implement an "append" option to write the files?

The use case is that in many occasions we need to add rows to an existing file.

jeroen commented 5 years ago

Unfortunately not. From the libxlsxwriter FAQ page:

Q. Can Libxlsxwriter use an existing Excel file as a template? No. Libxlsxwriter is designed only as a file writer. It cannot read or modify an existing Excel file.

So you'll have to read the file with readxl, then add the rows, and then write it with writexl.