I want to bold part of a text string. For example, is there a way to only bold 'text' in 'this is my text string' using openxlsx R package:
wb <- openxlsx::createWorkbook()
openxlsx::addWorksheet(wb, 'Contents')
bold_text <- openxlsx::createStyle(textDecoration = "bold")
openxlsx::addStyle(wb, sheet = 'Contents', bold_text, rows = 1, cols = 1, gridExpand = TRUE, stack = TRUE)
writeData(wb, sheet = 'Contents', x = 'this is my text string', startRow = 1, startCol = 1)
openxlsx::saveWorkbook(wb, file = 'D:testing.xlsx', overwrite = TRUE)