Copy to in sheet
This commit is contained in:
parent
56360bb10d
commit
fede099f4b
|
@ -1459,6 +1459,19 @@ class LOCalcSheet(object):
|
|||
self.doc._sheets.copyByName(self.name, new_name, index)
|
||||
return LOCalcSheet(self.doc._sheets[new_name])
|
||||
|
||||
def copy_to(self, doc, target='', pos=-1):
|
||||
index = pos
|
||||
if pos < 0:
|
||||
index = len(doc)
|
||||
name = self.name
|
||||
if not target:
|
||||
new_name = name
|
||||
|
||||
doc._sheets.importSheet(self.doc.obj, name, index)
|
||||
sheet = doc[name]
|
||||
sheet.name = new_name
|
||||
return sheet
|
||||
|
||||
def get_cursor(self, cell=None):
|
||||
if cell is None:
|
||||
cursor = self.obj.createCursor()
|
||||
|
|
Loading…
Reference in New Issue