forked from DeokyongKim/APTP2022
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.py
More file actions
27 lines (24 loc) · 756 Bytes
/
test.py
File metadata and controls
27 lines (24 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import openpyxl as o
wb = o.load_workbook("D:\Asterisk\신촌캠 노드.xlsx")
ws = wb['Sheet1']
node = {}
for i in range(2, 167):
nodename = ws.cell(row = i, column = 1).value
tmplt = [nodename, 10000]
guide = []
for j in range(4, 20, 2):
list = []
nodecode = ws.cell(row = i, column = j).value
cloud = str(ws.cell(row = i, column = j + 1).value)
cloud = cloud.replace(" ", "")
cloud = cloud.split(',')
if nodecode == None:
pass
else:
list.append(nodecode)
list.append(int(cloud[0]))
list.append(int(cloud[1]))
guide.extend(list)
tmplt.append(guide)
node[nodename] = tmplt
print(node)