Reporting Tools

This submodule contains functions used in Excel reporting, particularly by the Results class (see Results).

Functions

report_breakdown(breakdown, workbook)

Writes a Pandas Breakdown to Excel using passed writer.

report_table(table, workbook)

Writes a Table to Excel.

report_value(value, workbook)

Writes a Value to Excel.

set_default_col_widths(workbook)

Sets all columns in an active openpyxl workbook to a default width.

chromaquant.results.reporting_tools.format_cell(cell: Cell, group: CellStyle)

Format a cell in Excel.

Parameters

cellCell

Cell to format.

groupCellStyle

Style to format the cell by.

Returns

None

chromaquant.results.reporting_tools.format_multicell_dataset(dataset: Table | Breakdown, workbook: Workbook)

Format a Table or Breakdown in Excel.

Parameters

datasetTable | Breakdown

Dataset to format.

workbookWorkbook

Active openpyxl workbook.

Returns

None

chromaquant.results.reporting_tools.format_range(sheet: Worksheet, cell_range: str, group: CellStyle)
chromaquant.results.reporting_tools.report_breakdown(breakdown: Breakdown, workbook: Workbook)

Writes a Pandas Breakdown to Excel using passed writer.

Parameters

breakdownBreakdown

Pandas Breakdown to export.

workbookWorkbook

Xlsx workbook to export to.

Returns

None

chromaquant.results.reporting_tools.report_chart(chart: Chart, workbook: Workbook)

Writes a Chart to Excel.

Parameters

chartChart

Chart to report.

workbookWorkbook

Active openpyxl workbook.

Returns

None

chromaquant.results.reporting_tools.report_table(table: Table, workbook: Workbook)

Writes a Table to Excel.

Parameters

table: Table

Table to export.

workbookWorkbook

Xlsx workbook to export to.

Returns

None

chromaquant.results.reporting_tools.report_value(value: Value, workbook: Workbook)

Writes a Value to Excel.

Parameters

value: Value

Value to export.

workbookWorkbook

Active openpyxl workbook.

Returns

None

chromaquant.results.reporting_tools.set_default_col_widths(workbook: Workbook)

Sets all columns in an active openpyxl workbook to a default width.

Parameters

workbookWorkbook

Active openpyxl workbook.

Returns

None