write_workbook()

Writes a formatted Excel workbook to filename.

Parameters:

Name Type Description Default
filename str

Path to write final workbook to (an .xlsx file)

required
sheets dict

mapping worksheet labels to GPTable objects

required
theme Theme

formatting to be applied to GPTable elements. gptheme is used by default.

None
cover Cover

cover page text. Including this argument will generate a cover page.

None
contentsheet_label str

table of contents sheet label, defaults to "Contents". If None, table of contents will not be generated.

'Contents'
contentsheet_options dict

dictionary of contentsheet customisation parameters. Valid keys are additional_elements, column_names, table_name, title, subtitles and instructions

None
notes_table DataFrame

table with notes reference, text and (optional) link columns. If None, notes sheet will not be generated.

None
notesheet_label str

notes sheet label, defaults to "Notes"

'Notes'
notesheet_options dict

dictionary of notesheet customisation parameters. Valid keys are table_name, title and instructions.

None
auto_width bool

indicate if column widths should be automatically determined. True by default.

True
gridlines string

option to hide or show gridlines on worksheets. "show_all" - don't hide gridlines, "hide_printed" - hide printed gridlines only, or "hide_all" - hide screen and printed gridlines.

'hide_all'
cover_gridlines bool

indication if gridlines should apply to the cover worksheet. False by default.

False

Returns:

Type Description
None