workbook_set_properties

@brief Set the document properties such as Title, Author etc.

@param workbook Pointer to a lxw_workbook instance. @param properties Document properties to set.

The %workbook_set_properties method can be used to set the document properties of the Excel file created by libxlsxwriter. These properties are visible when you use the Office Button -> Prepare -> Properties option in Excel and are also available to external applications that read or index windows files.

The properties that can be set are:

- title - subject - author - manager - company - category - keywords - comments - hyperlink_base

The properties are specified via a lxw_doc_properties struct. All the members are char * and they are all optional. An example of how to create and pass the properties is:

@code // Create a properties structure and set some of the fields. lxw_doc_properties properties = { .title = "This is an example spreadsheet", .subject = "With document properties", .author = "John McNamara", .manager = "Dr. Heinz Doofenshmirtz", .company = "of Wolves", .category = "Example spreadsheets", .keywords = "Sample, Example, Properties", .comments = "Created with libxlsxwriter", .status = "Quo", };

// Set the properties in the workbook. workbook_set_properties(workbook, &properties); @endcode

@image html doc_properties.png

@return 0 for success, non-zero on error.

extern (C)
workbook_set_properties

Meta