主题
Row (属性)
返回区域中第一个子区域的第一行的行号。int 类型,只读。
示例
python
#本示例将工作表 sheet1 中每隔一行的行高设置为 4 磅
def test():
rw = Application.Worksheets.Item("Sheet1").Rows
for i in range(1, rw.Count):
if rw.Item(i).Row % 2 == 0:
rw.Item(i).RowHeight = 4
python
#本示例将 B1 单元格的值设置为 b1,并清除 A1 单元格所在行的内容
def test():
Range("B1").Value2 = 'b1'
ActiveSheet.Rows.Item(Range("A1").Row).Clear()