Python操作Excel之xlwt
2016-05-31 14:10
351 查看
#写入 import xlwt workbook=xlwt.Workbook() sheetn=workbook.add_sheet(u"测试数据",cell_overwrite_ok=True) sheetn.write(0,0,u"中国") sheetn.write(1,0,u"美国") sheetn.write(2,0,u"德国") style=xlwt.XFStyle() ft=xlwt.Font() ft.name="Times New Roman" ft.bold=True style.font=ft#第一种style style2=xlwt.easyxf('pattern:pattern solid,fore_colour red;font:bold on;')#第二种style sheetn.write(4,4,"Get over",style) sheetn.write(4,5,u"测试时",style2) workbook.save("test2.xlsx")
相关文章推荐
- Python爬虫
- Python操作Excel之xlrd
- 0622 python 基础05
- python06-切片、列表生成器
- 0617 python 基础04
- 0610 python 基础03
- python启动应用程序和终止应用程序
- python数据保存
- python 装饰器
- Python 3.4.3 使用threading模块进行多线程编码实现
- python官方文档
- python官方文档
- logistic回归和Python实现
- python编辑器对比和推荐
- python编辑器对比和推荐
- Python中:self和__init__的含义 + 为何要有self和__init__
- Python中:self和__init__的含义 + 为何要有self和__init__
- python 2.7.11 + windows 10 连接 mysql学习记录
- Python中变量的作用域(variable scope)
- Python中变量的作用域(variable scope)