Эксель

This commit is contained in:
iriska-gri committed 2023-11-24 15:41:40 +03:00
1 parent 55fe8f7fa0
commit fa1b17c64d
3 files changed
+7 -4

No files matched your search

+5 -2
View File
@@ -92,11 +92,12 @@ class roundExcel():
ws.merge_cells(start_row=k, start_column=2, end_row=k, end_column=12)
l = pd.DataFrame(self.df[(self.df.department==i)][['tabel', 'familyname', 'name', 'parentname']])
zap = [7, 9, 11]
for x in range(len(l)):
k=k+1
ws.cell(row = k, column = 1).value = numb
ws.cell(row = k, column = 1).font = Font(name='Times New Roman', size=10, bold=True)
@@ -104,6 +105,8 @@ class roundExcel():
ws.cell(row = k, column = 3).value = l.iloc[x]['familyname']
ws.cell(row = k, column = 4).value = l.iloc[x]['name']
ws.cell(row = k, column = 5).value = l.iloc[x]['parentname']
ws.cell(row = k, column = 6).value = '=If(H'+str(k)+'=1,"",1)'
print(k, '------------------------------')
for h in zap:
ws.cell(row = k, column = h).border = Border(top=thins, bottom=thins, left=thins, right=thins)
@@ -117,7 +120,7 @@ class roundExcel():
numb=numb+1
k=k+1
ws.cell(row = k+1, column=6).value = "=SUM(F6:F"+str(k-1)+")"