You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add support for richt text formatting as in write_rich_string for cell comments (write_comment). This is not covered in the current implementation, where you can set some basic formatting properties (like font size and background color) for the entire comment, but not for parts of it.
Use case: I would like to highlight certain portions of a long comment by changing formatting properties like bold, italic and font color.
The text was updated successfully, but these errors were encountered:
I have implemented this in my xlsxwriter-fork for my current project, which uses comments extensively for documentation purposes. The required additions to the source code are actually quite small, since the formatting functionality is already implemented in Worksheet.write_rich_string(). Besides a new method Worksheet.write_rich_comment(), I needed a conditional branch in Comment._write_text() and an additional method XMLwriter._xml_data_element_unencoded() to insert the preformatted string into the XML stream without escaping the format-tags.
Let me know if this is of interest for you.
I also just noted that the docstring of Worksheet.write_rich_string() incorrectly states
"-2: String truncated to 32k characters.", while the string is really discarded in that case.
Please add support for richt text formatting as in
write_rich_string
for cell comments (write_comment
). This is not covered in the current implementation, where you can set some basic formatting properties (like font size and background color) for the entire comment, but not for parts of it.Use case: I would like to highlight certain portions of a long comment by changing formatting properties like bold, italic and font color.
The text was updated successfully, but these errors were encountered: