excel_r.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Interface-test 作者: leiyong711 项目源码 文件源码
def excel():
    fname = "..\\Case\\test.xlsx"
    bk = xlrd.open_workbook(fname)
    try:
        sh = bk.sheet_by_name('Sheet1')
    except:
        print "%?????Sheet1?" % fname
    # ????
    nrows = sh.nrows
    # ????
    ncols = sh.ncols
    print '?????%s  ?????%s' % (nrows, ncols)
    a = []
    for i in range(0, nrows):
        c = sh.row_values(i)
        # if i == 0:
        #     continue
        # else:
        #     c[0] = int(c[0])
        #     c[6] = int(c[6])
        a.append(c)
    return a
#     print a
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号