ycphs/openxlsx

Copy style to a data

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
I want to do the following:
1.read the EXCEL file with the edited styles
2.apply those styles to the new data
3.save it

Describe the solution you'd like

wb<- loadWorkbook("QC.xlsx") 
writeData(wb, 1, NewData, startCol=1, startRow=1, rowNames=FALSE, colNames=TRUE)
saveWorkbook(wb, QC2.xlsx", overwrite=TRUE, returnValue=TRUE)

Additional context

  1. I have found that if the new data is large compared to the data readed in , the result is that parts of the new data don't have style
  2. if the new data is small compared to the data readed in , the result will contain the readed-in data

Is there a better way to do this?

Thanks in advance!