Fix code to set default font size = 10 : from openpyxl import Workbook
from openpyxl.styles import Alignment, Font, PatternFill
from openpyxl.utils import get_column_letter


def fill_sheet(sheet, sites):
    """
    Fill the excel sheet with missed cells.

    Args:
        sheet: openpyxl sheet object
        sites: list
    """
    if len(sites) == 0:
        return
    columns = [
        'Region',
        'ENM',
        'ERBS_Name',
        'ID',
        'eNBId',
        'Vlan',
        'VlanRef',
        'ExtEnodeB VlanRef',
        'EranLink',
        'PTP Time Sync',
        'Elastic Ran LKF',
        'Elastic Ran Feature',
        'BBU',
        'Port Bitrate',
        '10G LKF',
        '10G Feature',
        'EUtranCells',
        'Eran EUtranCells',
    ]

    row = 1
    for col in columns:
        cell = sheet.cell(row=row, column=columns.index(col) + 1)
        cell.value = col


    row = 2
    for site in sites:
        for col, cell_val in site.items():
            col_index = columns.index(col) +1
            cell = sheet.cell(row=row, column=col_index)
            cell.value = str(cell_val)
            if col in ['ExtEnodeB VlanRef', 'EranLink', 'EUtranCells', 'Eran EUtranCells']:
                cell.alignment = Alignment(wrap_text=True)
        row += 1

# Autofit columns except for specific columns
    green = "0000FF00"
    yellow = "00FFFF00"
    green_fill = PatternFill(start_color=green, end_color=green, fill_type="solid")
    yellow_fill = PatternFill(start_color=yellow, end_color=yellow, fill_type="solid")
    font = Font(size=10)
    for column_cells in sheet.columns:
        column_cells.font = font
        column_letter = get_column_letter(column_cells[0].column)

        # Exclude the specific columns by checking the column letter
        if column_letter == 'Q':
            for cell in column_cells:
                cell.font = Font(size=8)
            sheet.column_dimensions[column_letter].width = 12
        elif column_letter == 'R':
            for cell in column_cells:
                cell.font = Font(size=8)
                if '401' in cell.value:
                    cell.fill = yellow_fill
            sheet.column_dimensions[column_letter].width = 14

        elif column_letter == 'H':
            sheet.column_dimensions[column_letter].width = 31
        elif column_letter == 'I':
            sheet.column_dimensions[column_letter].width = 21
            for cell in column_cells:
                if 'ENABLED' in cell.value and 'DISABLED' not in cell.value:
                    cell.fill = green_fill
        else:
            max_length = 0
            adjusted_width = 0

            for cell in column_cells:
                if cell.coordinate in sheet.merged_cells:
                    continue

                if cell.value:
                    max_length = max(max_length, len(str(cell.value)))
                    adjusted_width = (max_length + 1)


            sheet.column_dimensions[column_letter].width = adjusted_width

def fill_excel(sites, path):
    """
    Fill excel file with missed in atoll cells, each technology to separate sheet.

    Args:
        selected_data: dict
        path: string
    """
    work_book = Workbook()

    work_sheet = work_book.create_sheet('ElasticRan')
    fill_sheet(work_sheet, sites)

    del work_book['Sheet']
    work_book.save(path)