質問編集履歴

1

変更しました

2019/08/11 12:35

投稿

Kirari
Kirari

スコア32

test CHANGED
File without changes
test CHANGED
@@ -74,8 +74,6 @@
74
74
 
75
75
  ws1 = wb.add_worksheet('sheet')
76
76
 
77
- ws1.append()
78
-
79
77
 
80
78
 
81
79
  row_index=0
@@ -96,35 +94,35 @@
96
94
 
97
95
  print("--------------------------------------------")
98
96
 
97
+
99
98
 
99
+ if name:
100
100
 
101
- for a in filter(lambda x:x != "",name):
102
-
103
- ws1.write(row_index, 0, a)
101
+ ws1.write(row_index, 0, name)
104
102
 
105
103
 
106
104
 
107
- for a in filter(lambda x:x != "",mid):
105
+ if mid:
108
106
 
109
- ws1.write(row_index, 1, a)
107
+ ws1.write(row_index, 1, mid)
110
108
 
111
109
 
112
110
 
113
- for a in filter(lambda x:x != "",daytime):
111
+ if daytime:
114
112
 
115
- ws1.write(row_index, 2, a)
113
+ ws1.write(row_index, 2, daytime)
116
114
 
117
115
 
118
116
 
119
- for a in filter(lambda x:x != "",body):
117
+ if body:
120
118
 
121
- ws1.write(row_index, 3, a)
119
+ ws1.write(row_index, 3, body)
122
120
 
123
121
 
124
122
 
125
123
  row_index=row_index+1
126
124
 
127
-
125
+
128
126
 
129
127
  wb.close()
130
128