RangeColumns
- class RangeColumns(rng)
Represents the columns of a range. Do not construct this class directly, use
Range.columnsinstead.Example
# Assumes an existing workbook object named book. sheet1 = book.sheets[0] myrange = sheet1.range('A1:C4') assert len(myrange.columns) == 3 # or myrange.columns.count myrange.columns[0].value = 'a' assert myrange.columns[2] == sheet1.range('C1:C4') assert myrange.columns(2) == sheet1.range('B1:B4') for c in myrange.columns: print(c.address)
Fetch column visibility in xlwings Lite; return
Nonefor a mixed selection.- Return type:
bool | None
Whether all represented worksheet columns are hidden.
Setting this property hides or shows the entire worksheet columns represented by the range. Returns
Nonewhen some columns are hidden and others are visible. In xlwings Lite, useawait rng.columns.get_hidden()to read this state.- Setter type:
bool