def get_column(name: str, worksheet) -> int:
    """Search a row of cells for the string.

    Args:
        name: The text to search for
        columns: The list or generator of columns in the excel sheet

    Returns:
        Either returns the column number or returns 0 if no column matched the name

    """
    for rows in worksheet.iter_rows(min_row=1, max_row=1, min_col=1):
        for column in rows:
            if column.value == name:
                return column.col_idx
    return 0