awalker89 / openxlsx

R package for .xlsx file reading and writing.
Other
364 stars 79 forks source link

Date Field Got Converted to Number Field when Style is Applied on Data. #450

Open chughk opened 5 years ago

chughk commented 5 years ago

I am trying to write an excel file with openxlsx. When I apply below style to the data the date field gets converted to a number field. Below is the code. If I exclude the below code then date fields are fine.

Code

bodyStyle <- createStyle(fontSize = 12, fontName = "Arial") addStyle(myworkbook, sheet = 1, bodyStyle, rows = 2:nrow(mydata), cols = 1:ncol(mydata), gridExpand = TRUE)