简体   繁体   中英

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.

To get at cell and row numbers you can use the first row index and the first column index from Excel's range class.

I recommend you dig through the Excel Applescript dictionary, lots of clues in there to possible syntax to try.

For your case:

set rw to the first row index of the active cell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM