atomica.excel.apply_widths(worksheet, width_dict)[source]

Set column widths

Given a dictionary of precomputed character counts (typically the maximum number of characters in any cell written to each column), set the width of the column in Excel accordingly. The Excel column width is slightly larger than the character count.

  • worksheet (Worksheet) – A Worksheet instance

  • width_dict (dict) – A dictionary of character widths to use for each column (by index)

Return type: