質問編集履歴
3
御返信に基づき,コメント部分一部修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,8 +60,6 @@
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
|
-
|
64
|
-
|
65
63
|
aaa = []
|
66
64
|
|
67
65
|
|
@@ -78,13 +76,13 @@
|
|
78
76
|
|
79
77
|
|
80
78
|
|
81
|
-
code = [100,102]
|
79
|
+
code = ['100','102']
|
82
80
|
|
83
81
|
|
84
82
|
|
85
83
|
bbb = []
|
86
84
|
|
87
|
-
for ccc in aaa:
|
85
|
+
for ccc in aaa:
|
88
86
|
|
89
87
|
if ccc[0] in code:
|
90
88
|
|
@@ -108,11 +106,13 @@
|
|
108
106
|
|
109
107
|
|
110
108
|
|
111
|
-
|
109
|
+
for ddd in bbb: #ここを追加
|
112
110
|
|
113
|
-
if
|
111
|
+
if ddd[2] in '本店':
|
114
112
|
|
113
|
+
if ddd[0] in '100':
|
114
|
+
|
115
|
-
wsws.cell(row=2,
|
115
|
+
wsws.cell(row=2,col=3).value = ddd[3] #試しに1セル転記できるか
|
116
116
|
|
117
117
|
|
118
118
|
|
@@ -126,23 +126,7 @@
|
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
-
TypeError Traceback (most recent call last)
|
130
|
-
|
131
|
-
<ipython-input-2-dd67f03bcc33> in <module>()
|
132
|
-
|
133
|
-
29 maxcol = wsws.max_column
|
134
|
-
|
135
|
-
30
|
136
|
-
|
137
|
-
---> 31 if bbb[2] in '本店':
|
138
|
-
|
139
|
-
|
129
|
+
エラーは出ないが,何も起きない
|
140
|
-
|
141
|
-
33 wsws.cell(row=2,min_col=3).value = bbb
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
TypeError: 'in <string>' requires string as left operand, not tuple
|
146
130
|
|
147
131
|
|
148
132
|
|
2
エラーの表示
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,6 +122,34 @@
|
|
122
122
|
|
123
123
|
|
124
124
|
|
125
|
+
###エラー
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
TypeError Traceback (most recent call last)
|
130
|
+
|
131
|
+
<ipython-input-2-dd67f03bcc33> in <module>()
|
132
|
+
|
133
|
+
29 maxcol = wsws.max_column
|
134
|
+
|
135
|
+
30
|
136
|
+
|
137
|
+
---> 31 if bbb[2] in '本店':
|
138
|
+
|
139
|
+
32 if bbb[0] in 100:
|
140
|
+
|
141
|
+
33 wsws.cell(row=2,min_col=3).value = bbb
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
TypeError: 'in <string>' requires string as left operand, not tuple
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
125
153
|
### 補足情報(FW/ツールのバージョンなど)
|
126
154
|
|
127
155
|
|
1
失礼いたしました。コードの挿入で編集しなおしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,6 +46,8 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
+
```ここに言語を入力
|
50
|
+
|
49
51
|
import openpyxl as py
|
50
52
|
|
51
53
|
|
@@ -66,7 +68,7 @@
|
|
66
68
|
|
67
69
|
for row in ws.iter_rows(min_row=1):
|
68
70
|
|
69
|
-
values = []
|
71
|
+
values = []
|
70
72
|
|
71
73
|
for c in row:
|
72
74
|
|
@@ -100,14 +102,6 @@
|
|
100
102
|
|
101
103
|
|
102
104
|
|
103
|
-
|
104
|
-
|
105
|
-
'''
|
106
|
-
|
107
|
-
ここから先でつまずいています
|
108
|
-
|
109
|
-
|
110
|
-
|
111
105
|
maxrow = wsws.max_row
|
112
106
|
|
113
107
|
maxcol = wsws.max_column
|
@@ -124,9 +118,7 @@
|
|
124
118
|
|
125
119
|
wbwb.save("結果.xlsx")
|
126
120
|
|
127
|
-
|
128
|
-
|
129
|
-
|
121
|
+
```
|
130
122
|
|
131
123
|
|
132
124
|
|