Another example of adding cell comments to a worksheet. This example demonstrates most of the available comment formatting options.
#include "xlsxwriter.h"
int main() {
"Hold the mouse over this cell to see the comment.",
text_wrap);
"This cell comment is visible.",
text_wrap);
"This cell comment isn't visible until you pass "
"the mouse over it (the default).",
text_wrap);
"This cell comment is visible, explicitly.",
text_wrap);
"This cell comment is also visible because "
"we used worksheet_show_comments().",
text_wrap);
"However, we can still override it locally.",
text_wrap);
"This cell comment is default size.",
text_wrap);
"This cell comment is twice as wide.",
text_wrap);
"This cell comment is twice as high.",
text_wrap);
"This cell comment is scaled in both directions.",
text_wrap);
"This cell comment has width and height specified in pixels.",
text_wrap);
"This cell comment is in the default position.",
text_wrap);
"This cell comment has been moved to another cell.",
text_wrap);
"This cell comment has been shifted within its default cell.",
text_wrap);
"This cell comment has a different color.",
text_wrap);
"This cell comment has the default color.",
text_wrap);
"This cell comment has a different color.",
text_wrap);
"Move the mouse over this cell and you will see 'Cell C3 "
"commented by' (blank) in the status bar at the bottom.",
text_wrap);
"Move the mouse over this cell and you will see 'Cell C6 "
"commented by libxlsxwriter' in the status bar at the bottom.",
text_wrap);
"The height of this row has been adjusted explicitly using "
"worksheet_set_row(). The size of the comment box is "
"adjusted accordingly by libxlsxwriter",
text_wrap);
"The height of this row has been adjusted by Excel when the "
"file is opened due to the text wrap property being set. "
"Unfortunately this means that the height of the row is "
"unknown to libxlsxwriter at run time and thus the comment "
"box is stretched as well.\n\n"
"Use worksheet_set_row() to specify the row height explicitly "
"to avoid this problem.",
text_wrap);
}