![](/img/trans.png)
[英]How do I verify specific Cell Value in an Excel Sheet through Pandas Data Frame in Python3.7
[英]How do I save a specific array value to a cell in Excel with Python?
我正在嘗試使用Python將數組值保存到Excel中的單元格中,但是我可以找到方法。
我嘗試了以下所有方法,但均無效果:
ws['A2'] = data[0][1]
ws['A2'] = 'data[0][1]'
cellValue = data[0][1]
ws['A2'] = cellValue
顯然,我是Python的初學者! 提前致謝!
使用標准的lib xlwt:
wb = xlwt.Workbook() #create your workbook
ws = wb.add_sheet(sheet_name)
ws.write(n,m,my_data) # where n is the target row and m the column
最后保存:
wb.save('workbook.xls')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.