code: def set_xlsx_colwidths(worksheet, fld2col_widths, fldnames):
          
          for col_idx, fld in enumerate(fldnames):
              col_width = fld2col_widths.get(fld, None)
              if col_width is not None:
                  worksheet.set_column(col_idx, col_idx, col_width)
docs: Set xlsx column widths using fld2col_widths.