###
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").
classSheet(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= []