[英]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
第3行不會編譯,但我需要遵循這些原則。
要獲取單元格和行號,可以使用Excel range
類中的first row index
和first column index
。
我建議您仔細閱讀Excel Applescript字典,那里有許多線索供您嘗試使用。
對於您的情況:
set rw to the first row index of the active cell
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.