John Machin
unread,Oct 12, 2012, 5:55:34 PM10/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-excel
> I am having a problem with sheet.nrows showing a smaller number than actual
> rows in Excel 2010 file.
> for example, nrows=822 but actual rows=851. nrows=910, actual rows=1079.
> I am using Python 2.3.7 and latest xlrd.
In your 822 actual but 851 expected example, where are the 29 rows
missing from: start of sheet? end of sheet? a contiguous block
elsewhere? seemingly at random? What are the contents of the missing
rows?
If the missing rows are all at the end of the sheet AND the cells in
those rows have formatting only (i.e. no data content) AND you are
operating with formatting_info=False (which is currently the only
possibility with Excel 2007+ files), then the observed result is to be
expected ... nrows = 1 + (highest row index of any data cell seen).
Similarly with ncols.
Otherwise, it looks like a bug somewhere; please provide a sample
file.
About Python 2.3: To be able to read Excel 2007+ files, you will have
needed to install an ElementTree implementation (not supplied with
Python 2.3). What did you install?