Skip to content

Commit 339c4aa

Browse files
authored
Update Automatizar Excel (formula).py
1 parent d7c984f commit 339c4aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spanish/Automatizar Excel (formula).py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ def automatizar_excel(nombre_archivo):
1010
archivo_excel = pd.read_excel(nombre_archivo)
1111
tabla_pivote = archivo_excel.pivot_table(index='Gender', columns='Product line', values='Total', aggfunc='sum').round(0)
1212
mes_extension = nombre_archivo.split('_')[1]
13-
tabla_pivote.to_excel(f'sales_{mes_extension}', startrow=4, sheet_name='Report')
13+
tabla_pivote.to_excel(f'report_{mes_extension}', startrow=4, sheet_name='Report')
1414

1515
# leer archivo excel para manipularlo con python
16-
wb = load_workbook(f'sales_{mes_extension}')
16+
wb = load_workbook(f'report_{mes_extension}')
1717
pestaña = wb['Report']
1818

1919
min_col = wb.active.min_column
@@ -48,7 +48,7 @@ def automatizar_excel(nombre_archivo):
4848
pestaña['A1'].font = Font('Arial', bold=True, size=20)
4949
pestaña['A2'].font = Font('Arial', bold=True, size=12)
5050

51-
wb.save(f'sales_{mes_extension}')
51+
wb.save(f'report_{mes_extension}')
5252
return
5353

5454
# automatizar reporte 2021

0 commit comments

Comments
 (0)