简体   繁体   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

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 indexfirst 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.

相关问题 如何使用AppleScript在Excel中将单元格值增加1? - How do I increment cell value by 1 in excel using AppleScript? AppleScript:如何以$ A $ 1格式返回Excel单元格引用 - Applescript: how to return Excel cell reference in $A$1 format 使用后期绑定到Excel,如何从活动单元格移动到下一行的第一个单元格? - Using late binding to Excel, how do I move from the active cell to the first cell in the next row? 如何使用Excel公式引用从一个工作表到另一个工作表的单元格范围? - How do I reference a cell range from one worksheet to another using excel formulas? 来自Excel中另一个单元格的范围行号引用 - Range row number reference from another cell in Excel 如何在公式中使用行号/如何从其他单元格中提取特定值(excel) - How to use row number in formula/how to extract specific value from other cell (excel) 在 Excel 中,如何使用另一个单元格中的列表从单元格中获取未知数量的值? - In Excel, how do I get an unknown number of values from cells using a list from another cell? Excel VBA:如何从字符串中提取数字? - Excel VBA : How do I extract number from a string? 如何使用表符号按行号或水平标题引用Excel表格单元格? - How To Reference an Excel Table Cell by Row Number or Horizontal Header Using Table Notation? 如何在与Excel中表格最高编号的单元格相同的行中的单元格中输出文本? - How do I output the text in a cell that's in the same row as the highest number cell of a table in excel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM