質問編集履歴
1
自己解決
test
CHANGED
File without changes
|
test
CHANGED
@@ -57,3 +57,57 @@
|
|
57
57
|
|
58
58
|
|
59
59
|
よろしくお願いします。
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
### 20200629 1809追記(自己解決)
|
66
|
+
|
67
|
+
```python
|
68
|
+
|
69
|
+
self.prbar1["maximum"] = len(output_data)
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# 値書き込み
|
74
|
+
|
75
|
+
for row, dic in enumerate(output_data):
|
76
|
+
|
77
|
+
for i, keyname in enumerate(header):
|
78
|
+
|
79
|
+
if keyname in dic.keys():
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
# 書式設定を文字列に
|
84
|
+
|
85
|
+
#if keyname in strcolumns:
|
86
|
+
|
87
|
+
#newws.cell(row=row+2, column=i+1).number_format = '@'
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
# 辞書の値をエクセルに書き込む
|
92
|
+
|
93
|
+
newws.cell(row=row+2, column=i+1).value = dic[keyname]
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
self.prbar1["value"] = row
|
98
|
+
|
99
|
+
self.update()
|
100
|
+
|
101
|
+
# ブックを保存
|
102
|
+
|
103
|
+
newwb.save(fname)
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
tkmb.showinfo("Result","Finished converting !", parent=self.this)
|
108
|
+
|
109
|
+
self.dialog.grab_set()
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
```
|