Untitled
unknown
plain_text
a year ago
402 B
8
Indexable
import openpyxl wb = openpyxl.Workbook() del wb['Sheet'] wb.create_sheet('Computadores') sheet_pc = wb['Computadores'] sheet_pc.append(['Computador','Ano','Preço']) wb.save('Computadores.xlsx') for linha in range(2,11): sheet_pc[f'A{linha}'] = f'Computador{linha-1}' sheet_pc[f'B{linha}'] = 2000+linha-1 sheet_pc[f'C{linha}'] = 500*(linha-1) wb.save('Computadores.xlsx')
Editor is loading...
Leave a Comment