我只是打印由線列表行從環路獲得輸出線和我的輸出是這樣的:如何通過線使用xlsWriterr
[' 4.0\n', ' 17.2\n', ' 7.0\n']
[' 0.0\n']
[' 4.0\n', ' 16.7\n', ' 4.0\n']
[' 4.0\n', ' 16.7\n', ' 4.0\n']
[' 4.0\n', ' 16.7\n', ' 4.0\n']
[' 4.0\n', ' 16.7\n', ' 4.0\n']
[' 4.0\n', ' 16.4\n', ' 4.0\n']
但在我的Excel輸出IM僅僅只獲得了第一線是這樣的:
我預期的結果是這些:
我當前的代碼是在這裏:
count = 0
DataList = []
for line, file in enumerate(PM2Line):
if POA in file:
DataList.append(file[32:50])
print DataList #--> this will print the list of output
worksheet.write_column('A1', DataList) #--> My problem is just getting first line.
workbook.close()
任何建議或評論。
什麼是你期待的輸出? –