TxtToXlsx python

#coding=utf-8  
import xlwt  
import xlrd  
try:

    filename=xlwt.Workbook()
    sheet=filename.add_sheet("test") //new table test

    sheet.write(3,2,hello)  //row 3 col 2, write word 'hello'
    filename.save("D:/test1.xls")  // save as test1.xls
except Exception,e:  
    print(str(e))  

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章