Pre-defining an action to take when an expected error occurs

Steve Lianoglou slianoglou at
Fri Sep 15 07:25:57 CEST 2006

> if the Excel sheet has 10 rows with data in them, the
> statement "range(sh.nrows)" should build the list of numbers [0,
> 1,...9]. It should, but it doesn't do that. What it does is buld a list
> from [0, 1...20] or more or a little less, but the point is that it
> always grabs empy rows after the last row containing data. Why is that?

Just a stab in the dark, but maybe there's some rogue whitespace in
some cell that's in a rowyou think is empty?

You could try to just select out a (small) region of your data, copy it
and paste it into a new spreadhseet to see if you're still getting the


More information about the Python-list mailing list