Reputation: 708
Is it possible to change comment formatting in xlsxwriter - write_comment() I would like to have monospaced font there like 'Courier New' and I have no idea how to do it. Any suggestions?
Upvotes: 4
Views: 1597
Reputation: 10186
Finally, there's a commit after my change request on github for this feature request. This is the commit: https://github.com/jmcnamara/XlsxWriter/commit/d49552c9c07e30900a120eca2f73226e682c31f2, i.e. you have to use the latest Master release.
Then you can use:
worksheet.write_comment('B2', 'Some text', {'font_name': 'MS Gothic', 'font_family': 3, 'font_size': 10})
Upvotes: 2
Reputation: 474281
According to Working with Cell Comments
documentation paragraph, xlsxwriter
doesn't let you change the default font used in comments. The only options you can change are:
author
visible
x_scale
width
y_scale
height
color
start_cell
start_row
start_col
x_offset
y_offset
Created a github issue at xlsxwriter
issue tracker, was marked as "feature request" by @jmcnamara:
Upvotes: 3