1
我可以通過應用程序的.Selection
屬性獲取區域。如何獲取Excel的COM接口選擇的行數和列數?
(我使用python訪問Excel的COM接口)
我想知道有多少行和列的用戶選擇,例如
input:
user has selected A1:G8
output:
the selected range starts from Column 1 (by selection.Column)
the selected range starts from Row 1 (by selection.Column)
the selected range is spanning 7 rows (by ?)
the selected range is spanning 8 columns (by ?)
我期待在MSDN的Range interface,但該物業似乎並沒有對這個問題有所幫助。
感謝,'選擇.Rows.Count'和'Selection.Columns.Count'起作用。 – thkang 2013-03-18 09:44:50