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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -