应为工作的原因有所接触python,学习过程中找了点有用的东东,分享一下
使用xlrd包,它可以运行在所有的平台上。...Windows下载链接:
http://download.csdn.net/detail/qianminming/2026756#comment
这意味着你可以在Linux系统上用Python读取Excel...:
cell_A1 = sh.cell(0,0).value
cell_C4 = sh.cell(2,3).value
在单元格输入一些内容:
row = 0
col = 0
ctype = 1 # 查看下面...value = 'asdf'
xf = 0 # 扩展的格式化 (默认是0)
sh.put_cell(row, col, ctype, value, xf)
sh.cell(0,0) # 文本:u'asdf...'
sh.cell(0,0).value # 'asdf'
可选的类型ctype: 0 = empty(空), 1 = string(字符), 2 = number(数字), 3 = date(日期),