wide_eyed_pupil
wide_eyed_pupil

Reputation: 3453

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.

Upvotes: 1

Views: 2169

Answers (1)

adamh
adamh

Reputation: 3292

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

Upvotes: 4

Related Questions