Skip to content

Instantly share code, notes, and snippets.

@mrshu
Last active December 23, 2020 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrshu/cc3befe1c40b740cfbc0f84951548140 to your computer and use it in GitHub Desktop.
Save mrshu/cc3befe1c40b740cfbc0f84951548140 to your computer and use it in GitHub Desktop.
An example of using the `write_rich_string` function
import xlsxwriter
workbook = xlsxwriter.Workbook('rich_strings.xlsx')
bold = workbook.add_format({'bold': True})
italic = workbook.add_format({'italic': True})
worksheet.write_rich_string('A1',
'This is ',
bold, 'bold',
' and this is ',
italic, 'italic')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment