colearendt / xlsx

An R package to interact with Excel files using the Apache POI java library
https://colearendt.github.io/xlsx/
86 stars 32 forks source link

addDataFrame(colStyle = NULL) removes cell style in existing worksheets #185

Open stvrd opened 2 years ago

stvrd commented 2 years ago

I am using xlsx to add Data Frames to existing excel templates. Currently, I see no way to keep the cell style when using addDataFrame(). I would expect addDataFrame(x,sheet,colStyle = NULL) to only paste the values, but not change the cell style.

Thank you in advance!

colearendt commented 2 years ago

Thanks for reporting this, and apologies for the delay in responding! I seem to recall that there is a way to do this, but I am blanking at the moment.