RangeRows

class RangeRows(rng)

Represents the rows of a range. Do not construct this class directly, use Range.rows instead.

サンプル

import xlwings as xw

wb = xw.Book("MyBook.xlsx")
sheet1 = wb.sheets[0]
myrange = sheet1.range('A1:C4')

assert len(myrange.rows) == 4  # or myrange.rows.count

myrange.rows[0].value = 'a'

assert myrange.rows[2] == sheet1.range('A3:C3')
assert myrange.rows(2) == sheet1.range('A2:C2')

for r in myrange.rows:
print(r.address)
autofit()

行の高さを自動調整します。

property count: int

行の数を返します。

Added in version 0.9.0.