how to do? createStyle location the data frame to write df <- res_after_filter_2019_smiles Create a new workbook wb <- createWorkbook("hello_excel") Add a worksheets addWorksheet(wb, "sheet01", gridLines = FALSE) write data to worksheet 1 writeData(wb, sheet = 1, df, rowNames = FALSE) create and add a style to the column headers headerStyle <- createStyle( fontSize = 12, fontColour = "#FFFFFF", halign = "center", fgFill = "#4F81BD", border = "TopBottom", borderColour = "#4F81BD" ) addStyle( wb, sheet = 1, headerStyle, rows = 1, cols = 1:ncol(df), gridExpand = TRUE ) style for body bodyStyle <- createStyle(border = "TopBottom", borderColour = "#4F81BD", fgFill = "#CDEDD0") row_to_color <- df %>% tibble::rowid_to_column(.

Continue reading

Author's picture

Jixing Liu

Reading And Writing

Data Scientist

China