libxlsxwriter
lxw_format Struct Reference

Struct to represent the formatting properties of an Excel format. More...

Detailed Description

Formats in libxlsxwriter are accessed via this struct.

The members of the lxw_format struct aren't modified directly. Instead the format properties are set by calling the functions shown in format.h.

For example:

// Create the Format.
lxw_format *format = workbook_add_format(workbook);
// Set some of the format properties.
// Use the format to change the text format in a cell.
worksheet_write_string(worksheet, 0, 0, "Hello", format);
Examples
anatomy.c, autofilter.c, chart_area.c, chart_bar.c, chart_clustered.c, chart_column.c, chart_data_labels.c, chart_data_table.c, chart_data_tools.c, chart_doughnut.c, chart_line.c, chart_pattern.c, chart_pie.c, chart_radar.c, chart_scatter.c, chartsheet.c, comments2.c, conditional_format1.c, conditional_format2.c, data_validate.c, dates_and_times01.c, dates_and_times02.c, dates_and_times03.c, dates_and_times04.c, demo.c, diagonal_border.c, dynamic_arrays.c, format_font.c, format_num_format.c, hyperlinks.c, merge_range.c, merge_rich_string.c, outline.c, outline_collapsed.c, panes.c, rich_strings.c, tables.c, tutorial2.c, tutorial3.c, and worksheet_protection.c.
format_set_bold
void format_set_bold(lxw_format *format)
Turn on bold for the format font.
lxw_format
Struct to represent the formatting properties of an Excel format.
Definition: format.h:358
worksheet_write_string
lxw_error worksheet_write_string(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, const char *string, lxw_format *format)
Write a string to a worksheet cell.
LXW_COLOR_RED
@ LXW_COLOR_RED
Definition: format.h:217
format_set_font_color
void format_set_font_color(lxw_format *format, lxw_color_t color)
Set the color of the font used in the cell.
workbook_add_format
lxw_format * workbook_add_format(lxw_workbook *workbook)
Create a new Format object to formats cells in worksheets.