This commit is contained in:
EillesWan 2022-08-09 15:13:25 +08:00
parent 96af5183ac
commit 3b53846ade
2 changed files with 0 additions and 28 deletions

Binary file not shown.

View File

@ -1,28 +0,0 @@
from openpyxl import *
def get():
wb = load_workbook('program音色表.xlsx')
ws = wb.active
# 所有行
keys = []
values = []
for row in ws.iter_rows():
for cell in row:
# print(cell.value)
try:
keys.append(int(cell.value))
except ValueError:
values.append(cell.value)
# # 所有列
# for column in ws.iter_cols():
# for cell in column:
# print(cell.value)
out = ""
index = 0
for i in keys:
out += ", \"" + str(i) + "\": \"" + values[index] + "\""
index += 1
print(out)