import openpyxl
from openpyxl.utils import get_column_letter

wb = openpyxl.load_workbook('flip.xlsx')
sheet = wb.active
max_row = sheet.max_row
max_column = sheet.max_column

sheetData = [[0 for col in range(max_column)] for row in range(max_row)]

for i in range(1, max_row + 1):
    for j in range(1, max_column + 1):
        column_name = get_column_letter(j)
        sheetData[i - 1][j - 1] = sheet[column_name + str(i)].value

# print(sheetData)

wb2 = openpyxl.Workbook()
sheet2 = wb2.active
for i in range(1, max_row + 1):
    for j in range(1, max_column + 1):
        column_name = get_column_letter(i)
        # print(column_name + str(j) + '---' + str(sheetData[i - 1][j-1]))
        # print(sheetData[i - 1][j-1])
        sheet2[column_name + str(j)] = sheetData[i - 1][j-1]

wb2.save('flip2.xlsx')