Python遍历excle

#遍历sheet1中所有行row
num_rows = worksheet1.nrows
for curr_row in range(num_rows):
row = worksheet1.row_values(curr_row)
print('row%s is %s' %(curr_row,row))


#遍历sheet1中所有列col
num_cols = worksheet1.ncols
for curr_col in range(num_cols):
col = worksheet1.col_values(curr_col)
print('col%s is %s' %(curr_col,col))


#遍历sheet1中所有单元格cell

for rown in range(num_rows):
for coln in range(num_cols):
cell = worksheet1.cell_value(rown,coln)
print cell

上一篇:Android Studio安装插件提示was not installed: Cannot download的解决


下一篇:【转】IntelliJ IDEA下自动生成Hibernate映射文件以及实体类