http://meetbill.github.io/
分类: LINUX
2016-06-14 22:47:23
#coding:utf-8
'''
Created on 2015-11-19
@author: Administrator
'''
import xlwt book = xlwt.Workbook(encoding='utf-8') sheet = book.add_sheet('sheet1') first_col=sheet.col(0) #xlwt中是行和列都是从0开始计算的 sec_col=sheet.col(1) first_col.width=256*20 book.save('width.xls')
#coding:utf-8
'''
Created on 2015-11-19
@author: Administrator
'''
import xlwt book = xlwt.Workbook(encoding='utf-8') sheet = book.add_sheet('sheet1') first_col=sheet.col(0) sec_col=sheet.col(1) first_col.width=256*20 tall_style = xlwt.easyxf('font:height 720;') # 36pt,类型小初的字号 first_row = sheet.row(0) first_row.set_style(tall_style) book.save('width.xls')