in osci/datalake/reports/excel/osci_change.py [0:0]
def _write_table_header(self, start_from: Position):
row, col = start_from
header_format = self.get_format(self.border_rule_1, self.bold_format_rule)
superscript_format = self.get_format(self.bold_format_rule, self.superscript_format_rule)
border_format = self.get_format(self.border_rule_1)
center_header_format = self.get_format(self.border_rule_1, self.bold_format_rule, self.align_center_rule)
for table_column in self.table_columns:
if table_column.superscript_suffix:
self.worksheet.write_rich_string(row, col, header_format, table_column.name,
superscript_format, table_column.superscript_suffix, border_format)
else:
self.worksheet.write(row, col, table_column.name,
center_header_format
if table_column.name in {self.schema.position, self.schema.position_change}
else header_format)
col_width = len(table_column.name) * table_column.cell_scale
self.worksheet.set_column(col, col, width=col_width)
col += 1