代碼
import xlwt
workbook = xlwt.Workbook()
worksheet = workbook.add_sheet('sheet1')
data = np.arange(1, 65).reshape(8, 8)
for r in range(8):
for c in range(8):
worksheet.write(r, c, data[r, c])
workbook.save('F:\data\ex4.xls')
報錯顯示:
Traceback (most recent call last):
File "F:/pyx/01.py", line 157, in <module>
worksheet.write(r, c, data[r, c])
File "F:\python\lib\site-packages\xlwt\Worksheet.py", line 1088, in write
self.row(r).write(c, label, style)
File "F:\python\lib\site-packages\xlwt\Row.py", line 254, in write
raise Exception("Unexpected data type %r" % type(label))
Exception: Unexpected data type <class 'numpy.int32'>
我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......