mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-02-07 19:36:46 +08:00
ok
This commit is contained in:
parent
96af5183ac
commit
3b53846ade
Binary file not shown.
@ -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)
|
|
Loading…
x
Reference in New Issue
Block a user