[英]How do I extract the row number from a cell reference in Excel using Applescript?
tell application "Microsoft Excel"
set ac to get address of active cell
-- set rw to row of ac
log ("Active cell: " & ac & return & "Row from Active Cell: " & rw)
end tell
Line 3 will not compile but I need something along those lines. 第3行不会编译,但我需要遵循这些原则。
To get at cell and row numbers you can use the first row index
and the first column index
from Excel's range
class. 要获取单元格和行号,可以使用Excel range
类中的first row index
和first column index
。
I recommend you dig through the Excel Applescript dictionary, lots of clues in there to possible syntax to try. 我建议您仔细阅读Excel Applescript字典,那里有许多线索供您尝试使用。
For your case: 对于您的情况:
set rw to the first row index of the active cell
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.