簡體   English   中英

如何使用Applescript從Excel中的單元格引用中提取行號?

[英]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 indexfirst column index

我建議您仔細閱讀Excel Applescript字典,那里有許多線索供您嘗試使用。

對於您的情況:

set rw to the first row index of the active cell

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM