[COM Newbie] How to find out the # of cells and rows in an excelsheet

Tony Meyer t-meyer at ihug.co.nz
Sun Nov 16 19:19:10 EST 2003


> Having a reference to an excel workbook and worksheet, how 
> can I get the width and height of the area with data without 
> iterating through 65536 rows * 256 columns (which would take 
> a small eternity)?

You're after the UsedRange property.  It's a property of various things,
including WorkSheets.  The Excel object reference has more info on it.

=Tony Meyer






More information about the Python-list mailing list