【python】创建excel文档.csv
Date: 2018.8.18
https://blog.csdn.net/listener51/article/details/81876386
https://www.cnblogs.com/vsivn/p/6115537.html
1、python创建excel
def creat_csv(csvname):
file = open(csvname, 'wb')
writer = csv.writer(file)
file.close
2、python往csv中写中文
import csv
import codecs
csvfile = file('csv_test.csv', 'wb')
csvfile.write(codecs.BOM_UTF8)
writer = csv.writer(csvfile)
list = ['姓名', '年龄', '电话']
writer.writerow(list)
csvfile.close()
本文为博主原创文章,未经博主允许不得转载。若允许转载,请注明来源https://www.cnblogs.com/SoaringLee/,否则保留追究法律责任的权利!
另外,本人提供付费咨询服务并长期承接各类毕设以及外包项目。联系QQ:2963033731。加Q备注:CNBLOG外包