Hello guys I created an excel and I change the width and the height of some cells and I would like to insert a dataframe into this modified excel however I don't know how to do it, did someone have any idea ? my code below :
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws.column_dimensions['A'].width = 10
ws.column_dimensions['B'].width = 10
ws.column_dimensions['C'].width = 50
ws.column_dimensions['D'].width = 130
ws.column_dimensions['E'].width = 30
ws.column_dimensions['F'].width = 10
ws.row_dimensions[1].height = 150
ws.row_dimensions[2].height = 150
ws.row_dimensions[3].height = 150
ws.row_dimensions[4].height = 150
ws.row_dimensions[5].height = 150
ws.row_dimensions[6].height = 150
wb.save(filename='t.xlsx')
data = {'first': [1], 'second': [2], 'third': [3], 'fourth': [4]}
t = pd.DataFrame(data,columns = ['first', 'second', 'third','fourth'])
