title: Rich text for the dynamic value string in excel for python
body: <p>I have used xlsxwriter and openpyxl module of python for rich string but they don't provide that much flexibility for searching specific word of dynamic string and highlight that one.
  Does anyone have better option for this? alternatively, I am trying to split the dynamic string into and trying to add styles in between to incorporate with the xlsxwriter.write_rich_string() format.
  below is the sample code:
   ....some starting code here</p>
  
  <pre><code>completestring="Stackoverflow is best site" #this will be a dynamic string ,and need to highlight **best** here
  
  str1="Stackoverflow is"
  str2="best"
  str3="site"
  bold= workbook.add_format()
  bold.set_bold()
  bold.set_font_color('red')
  
  stringpart=[str1,bold,str2,str3]
  
  worksheet.write_rich_string('A1',*stringpart)
  </code></pre>