(index, num_blanks, filename)
Args:
        index (int): row in file to start insert
        num_blanks (int): number of blank rows to insert
        filename (str): filename to insert blanks
    Returns:
        None
Args:
        index (int): row in file to start insert
        num_blanks (int): number of blank rows to insert
        filename (str): filename to insert blanks
    Returns:
        None
Args : index ( int ) : row in file to start insert num_blanks ( int ) : number of blank rows to insert filename ( str ) : filename to insert blanks Returns : None
def blankRowInserter(index, num_blanks, filename):
    """
    Args:
        index (int): row in file to start insert
        num_blanks (int): number of blank rows to insert
        filename (str): filename to insert blanks
    Returns:
        None
    """
    wb = openpyxl.load_workbook(filename)
    sheet = wb.active
    rows = tuple(sheet.rows)

    
    for rowObj in rows[::-1]:
        for cellObj in rowObj:
            c = cellObj.column
            r = cellObj.row

            if r >= index and r < index+num_blanks:
                sheet.cell(row=r+num_blanks, column=c).value = cellObj.value
                sheet.cell(row=r, column=c).value = ''
            elif r >= index+num_blanks:
                sheet.cell(row=r+num_blanks, column=c).value = cellObj.value
    
    wb.save('result_'+filename)
def blankRowInserter ( index , num_blanks , filename ) : wb = openpyxl . load_workbook ( filename ) sheet = wb . active rows = tuple ( sheet . rows ) for rowObj in rows [ : : - 1 ] : for cellObj in rowObj : c = cellObj . column r = cellObj . row if r >= index and r < index + num_blanks : sheet . cell ( row = r + num_blanks , column = c ) . value = cellObj . value sheet . cell ( row = r , column = c ) . value = '' elif r >= index + num_blanks : sheet . cell ( row = r + num_blanks , column = c ) . value = cellObj . value wb . save ( 'result_' + filename )