worksheet_write_string

@brief Write a string to a worksheet cell.

@param worksheet pointer to a lxw_worksheet instance to be updated. @param row The zero indexed row number. @param col The zero indexed column number. @param string String to write to cell. @param format A pointer to a Format instance or NULL.

@return A #lxw_error code.

The %worksheet_write_string() function writes a string to the cell specified by row and column:

@code worksheet_write_string(worksheet, 0, 0, "This phrase is English!", NULL); @endcode

@image html write_string01.png

The format parameter is used to apply formatting to the cell. This parameter can be NULL to indicate no formatting or it can be a @ref format.h "Format" object:

@code lxw_format *format = workbook_add_format(workbook); format_set_bold(format);

worksheet_write_string(worksheet, 0, 0, "This phrase is Bold!", format); @endcode

@image html write_string02.png

Unicode strings are supported in UTF-8 encoding. This generally requires that your source file is UTF-8 encoded or that the data has been read from a UTF-8 source:

@code worksheet_write_string(worksheet, 0, 0, "Это фраза на русском!", NULL); @endcode

@image html write_string03.png

extern (C)
worksheet_write_string

Meta