rld在python_python

###

Contains

the data for one

worksheet.

#

#

In the

cell access functions, "rowx" is a row index, counting from zero,

and "colx" is a# column index,

counting from zero.# Negative values for

row/column indexes and slice positions are supported in the

expected

fashion.

#

#

For

information about cell types and cell values, refer to the

documentation of the Cell

class.

#

#

WARNING:

You don"t call this class yourself. You access Sheet objects via

the Book object that# was returned when you

called

xlrd.open_workbook("myfile.xls").

class

Sheet(BaseObject):

## # Name of sheet. name = "" ## # Number of rows in sheet. A row index is in

range(thesheet.nrows). nrows = 0 ## # Number of columns in sheet. A column index

is in range(thesheet.ncols). ncols = 0 ## # The map from a column index to a Colinfo

object. Often there is an entry # in COLINFO records for all column indexes

in range(257). # Note that xlrd ignores the entry for the

non-existent # 257th column. On the other hand, there may

be no entry for unused columns. #
--

New in version 0.6.1 colinfo_map = {} ## # The map from a row index to a Rowinfo

object. Note that it is possible # to have missing entries -- at least one

source of XLS files doesn"t # bother writing ROW

records.

#
--

New in version 0.6.1 rowinfo_map = {} ## # List of address ranges of cells containing

column labels. # These are set up in Excel by Insert

> Name > Labels >

Columns.

#
-- New

in version 0.6.0 #
How to

deconstruct the list: #

 # for crange in

thesheet.col_label_ranges: # rlo, rhi, clo, chi =

crange

# for rx in xrange(rlo,

rhi):

# for cx in xrange(clo,

chi):

# print "Column label at (rowx=%d, colx=%d)

is %r" \

# (rx, cx, thesheet.cell_value(rx,

cx))

#

col_label_ranges

= []

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值