Get rows from range
This commit is contained in:
parent
6c1a94e468
commit
9447a66acd
|
@ -1563,10 +1563,14 @@ class LOSheetRows(object):
|
|||
|
||||
def __getitem__(self, index):
|
||||
if isinstance(index, int):
|
||||
return LOSheetRows(self._sheet, self.obj[index])
|
||||
rows = LOSheetRows(self._sheet, self.obj[index])
|
||||
else:
|
||||
rango = self._sheet[index.start:index.stop,0:]
|
||||
return LOSheetRows(self._sheet, rango.obj.Rows)
|
||||
rows = LOSheetRows(self._sheet, rango.obj.Rows)
|
||||
return rows
|
||||
|
||||
def __len__(self):
|
||||
return self.obj.Count
|
||||
|
||||
@property
|
||||
def obj(self):
|
||||
|
@ -1741,33 +1745,6 @@ class LOCalcSheet(object):
|
|||
return rango.render(data, clean)
|
||||
|
||||
|
||||
class LOCalcRows(object):
|
||||
|
||||
def __init__(self, obj):
|
||||
self._obj = obj
|
||||
|
||||
def __len__(self):
|
||||
return self.obj.Count
|
||||
|
||||
def __str__(self):
|
||||
return 'Rows'
|
||||
|
||||
@property
|
||||
def obj(self):
|
||||
return self._obj
|
||||
|
||||
@property
|
||||
def count(self):
|
||||
return len(self)
|
||||
|
||||
@property
|
||||
def visible(self):
|
||||
return self.obj.IsVisible
|
||||
@visible.setter
|
||||
def visible(self, value):
|
||||
self.obj.IsVisible = value
|
||||
|
||||
|
||||
class LOCalcRange(object):
|
||||
|
||||
def __init__(self, obj):
|
||||
|
@ -1863,7 +1840,7 @@ class LOCalcRange(object):
|
|||
|
||||
@property
|
||||
def rows(self):
|
||||
return LOCalcRows(self.obj.Rows)
|
||||
return LOSheetRows(self.sheet, self.obj.Rows)
|
||||
|
||||
@property
|
||||
def row(self):
|
||||
|
|
Loading…
Reference in New Issue