python - How can I get number of rows and columns selected by excel COM interface? -


i can area selected application's .selection property.

(i'm using python access excel com interface)

i want know how many rows , columns user have selected, instance

input:     user has selected a1:g8 output:     selected range starts column 1 (by selection.column)     selected range starts row 1 (by selection.column)     selected range spanning 7 rows (by ?)     selected range spanning 8 columns (by ?) 

i'm looking @ msdn's range interface, property's doesn't seems helpful problem.

from vba, this:

debug.print selection.rows.count debug.print selection.columns.count debug.print selection.row debug.print selection.column 

with a1:g8 selected, returns

8  7  1  1  

is translated python>


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -