libxlsxwriter
Loading...
Searching...
No Matches
Data Fields
lxw_comment_options Struct Reference

Options for inserted comments. More...

Detailed Description

Options for modifying comments inserted via worksheet_write_comment_opt().

Examples
comments2.c.

Data Fields

uint8_t visible
 
const char * author
 
uint16_t width
 
uint16_t height
 
double x_scale
 
double y_scale
 
lxw_color_t color
 
const char * font_name
 
double font_size
 
uint8_t font_family
 
lxw_row_t start_row
 
lxw_col_t start_col
 
int32_t x_offset
 
int32_t y_offset
 

Field Documentation

◆ visible

uint8_t lxw_comment_options::visible

This option is used to make a cell comment visible when the worksheet is opened. The default behavior in Excel is that comments are initially hidden. However, it is also possible in Excel to make individual comments or all comments visible. You can make all comments in the worksheet visible using the worksheet_show_comments() function. Defaults to LXW_COMMENT_DISPLAY_DEFAULT. See also Cell comments: visible.

Examples
comments2.c.

◆ author

const char* lxw_comment_options::author

This option is used to indicate the author of the cell comment. Excel displays the author in the status bar at the bottom of the worksheet. The default author for all cell comments in a worksheet can be set using the worksheet_set_comments_author() function. Set to NULL if not required. See also Cell comments: author.

Examples
comments2.c.

◆ width

uint16_t lxw_comment_options::width

This option is used to set the width of the cell comment box explicitly in pixels. The default width is 128 pixels. See also Cell comments: width.

Examples
comments2.c.

◆ height

uint16_t lxw_comment_options::height

This option is used to set the height of the cell comment box explicitly in pixels. The default height is 74 pixels. See also Cell comments: height.

◆ x_scale

double lxw_comment_options::x_scale

X scale of the comment as a decimal. See also Cell comments: x_scale.

Examples
comments2.c.

◆ y_scale

double lxw_comment_options::y_scale

Y scale of the comment as a decimal. See also Cell comments: y_scale.

Examples
comments2.c.

◆ color

lxw_color_t lxw_comment_options::color

This option is used to set the background color of cell comment box. The color should be an RGB integer value, see Working with Colors. See also Cell comments: color.

Examples
comments2.c.

◆ font_name

const char* lxw_comment_options::font_name

This option is used to set the font for the comment. The default font is 'Tahoma'. See also Cell comments: font_name.

◆ font_size

double lxw_comment_options::font_size

This option is used to set the font size for the comment. The default is 8. See also Cell comments: font_size.

◆ font_family

uint8_t lxw_comment_options::font_family

This option is used to set the font family number for the comment. Not required very often. Set to 0.

◆ start_row

lxw_row_t lxw_comment_options::start_row

This option is used to set the row in which the comment will appear. By default Excel displays comments one cell to the right and one cell above the cell to which the comment relates. The start_row and start_col options should both be set to 0 if not used. See also Cell comments: start_row.

Examples
comments2.c.

◆ start_col

lxw_col_t lxw_comment_options::start_col

This option is used to set the column in which the comment will appear. See the start_row option for more information and see also Cell comments: start_col.

◆ x_offset

int32_t lxw_comment_options::x_offset

Offset from the left of the cell in pixels. See also Cell comments: x_offset.

Examples
comments2.c.

◆ y_offset

int32_t lxw_comment_options::y_offset

Offset from the top of the cell in pixels. See also Cell comments: y_offset.