Created
September 17, 2019 07:33
-
-
Save TimurNurlygayanov/781c1885f0e975e3bb2884a527b5de68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openpyxl import load_workbook | |
data_file = '111.xlsx' | |
wb = load_workbook(filename=data_file) | |
data = wb['исходные'] | |
filial_number = '01' | |
i = 2 | |
while filial_number: | |
cell = 'F{0}'.format(i) | |
value = ("=IFS(E{0}='списки'!A$2, 'списки'!B$2, E{0}='списки'!A$3, " | |
"'списки'!B$3, E{0}='списки'!A$4, 'списки'!B$4)") | |
data[cell] = value.format(i) | |
i += 1 | |
filial_number = data['E{0}'.format(i)].value | |
wb.save(data_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment