diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle
index 43d2fb8..001a9f1 100644
Binary files a/doc/build/.doctrees/environment.pickle and b/doc/build/.doctrees/environment.pickle differ
diff --git a/doc/build/.doctrees/main/calc.doctree b/doc/build/.doctrees/main/calc.doctree
index 05f8d38..43ef88b 100644
Binary files a/doc/build/.doctrees/main/calc.doctree and b/doc/build/.doctrees/main/calc.doctree differ
diff --git a/doc/build/.doctrees/main/calc_data.doctree b/doc/build/.doctrees/main/calc_data.doctree
new file mode 100644
index 0000000..f1f3857
Binary files /dev/null and b/doc/build/.doctrees/main/calc_data.doctree differ
diff --git a/doc/build/.doctrees/main/calc_doc.doctree b/doc/build/.doctrees/main/calc_doc.doctree
new file mode 100644
index 0000000..6c136e0
Binary files /dev/null and b/doc/build/.doctrees/main/calc_doc.doctree differ
diff --git a/doc/build/.doctrees/main/calc_ranges.doctree b/doc/build/.doctrees/main/calc_ranges.doctree
new file mode 100644
index 0000000..b219f92
Binary files /dev/null and b/doc/build/.doctrees/main/calc_ranges.doctree differ
diff --git a/doc/build/.doctrees/main/calc_ranges2.doctree b/doc/build/.doctrees/main/calc_ranges2.doctree
new file mode 100644
index 0000000..dfbb56f
Binary files /dev/null and b/doc/build/.doctrees/main/calc_ranges2.doctree differ
diff --git a/doc/build/.doctrees/main/calc_sheets.doctree b/doc/build/.doctrees/main/calc_sheets.doctree
new file mode 100644
index 0000000..18fe17c
Binary files /dev/null and b/doc/build/.doctrees/main/calc_sheets.doctree differ
diff --git a/doc/build/_sources/main/calc.rst.txt b/doc/build/_sources/main/calc.rst.txt
index 8dfd34d..f26ad34 100644
--- a/doc/build/_sources/main/calc.rst.txt
+++ b/doc/build/_sources/main/calc.rst.txt
@@ -1,4 +1,3 @@
-
Calc
----
@@ -9,583 +8,11 @@ Remember, always import library.
import easymacro as app
-Document
-~~~~~~~~
-
-Current doc
-^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.type)
-
-
-Selection
-^^^^^^^^^
-
-* If selection is range get LOCalcRange, if selection is shape get LOShape, other selection get original pyuno object.
-
-.. code-block:: python
-
- doc = app.active
- selection = doc.selection
- app.msgbox(type(selection))
-
-
-Headers
-^^^^^^^
-
-* Hide or show columns and rows headers.
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.headers)
- doc.headers = not doc.headers
- app.msgbox(doc.headers)
- doc.headers = not doc.headers
-
-
-Tabs
-^^^^
-
-* Hide or show tab sheets.
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.tabs)
- doc.tabs = not doc.tabs
- app.msgbox(doc.tabs)
- doc.tabs = not doc.tabs
-
-
-Sheets
-~~~~~~
-
-Active sheet
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.name)
-
- # or
- doc = app.active
- sheet = doc.active
-
-
-Get by index
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc[0]
- app.msgbox(sheet.name)
-
-
-Get by name
-^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc['Sheet1']
- app.msgbox(sheet.name)
-
-
-Contains
-^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox('Sheet1' in doc)
-
-
-Get tuple with all names
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.names)
-
-
-Count
-^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(len(doc))
-
-New
-^^^
-
-* Always validate if new name not exists.
-
-.. code-block:: python
-
- doc = app.active
-
- sheet = doc.new_sheet()
- # CAUTION: If 'NewSheet' exists, reset it to clean sheet.
- doc['NewSheet'] = sheet
-
- # ~ or
-
- sheet = doc.insert('NewSheet2')
-
-* Insert multiple, get last insert.
-
-.. code-block:: python
-
- names = ('One', 'Two', 'Three')
- sheet = doc.insert(names)
-
-
-Move
-^^^^
-
-* Move by object to last position.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.move(sheet)
-
-* Move by name to last position.
-
-.. code-block:: python
-
- doc.move('Sheet1')
-
-* Move to position.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.move(sheet, 2)
-
-* Move from sheet
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.move()
-
-* Move to position.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.move(2)
-
-
-Remove
-^^^^^^
-
-* Remove by object.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.remove(sheet)
-
-* Remove by name.
-
-.. code-block:: python
-
- doc.remove('One')
-
-* Remove from sheet.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.remove()
-
-
-Copy
-^^^^
-
-* Copy inside the same spreadsheet.
-
-* By object
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.copy(sheet, 'OtherSheet')
-
-* By name
-
-.. code-block:: python
-
- doc.copy('Sheet1', 'Sheet2')
-
-* From sheet
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.copy(sheet.name + '_2')
-
-
-Copy from
-^^^^^^^^^
-
-* Copy sheet from one spreadsheet to other.
-
-.. code-block:: python
-
- doc = app.active
- doc_source = app.docs['Contacts.ods']
- name_source = 'Names'
- name_target = 'Names'
- position = 0
- doc.copy_from(doc_source, name_source, name_target, position)
-
-
-Copy to
-^^^^^^^
-
-* Copy from sheet with the same name
-
-.. code-block:: python
-
- doc = app.docs.new()
- sheet = app.active_sheet
- sheet.copy_to(doc)
-
-* Used new name
-
-.. code-block:: python
-
- doc = app.docs.new()
- sheet = app.active_sheet
- sheet.copy_to(doc, 'NewName')
-
-
-Sort
-^^^^
-
-* Sort sheets by names.
-
-.. code-block:: python
-
- doc = app.active
- doc.sort()
-
-Name
-^^^^
-
-* Name visible by the user.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.name)
- sheet.name = 'NewName'
- app.msgbox(sheet.name)
-
-
-Code name
-^^^^^^^^^
-
-* Name only accessible by code.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.code_name)
- sheet.code_name = 'my_name'
- app.msgbox(sheet.code_name)
-
-
-Visible
-^^^^^^^
-
-* Apply only with spreadsheet with two or more sheets.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.visible)
- sheet.visible = not sheet.visible
- app.msgbox(sheet.visible)
- sheet.visible = not sheet.visible
-
-
-Is protected
-^^^^^^^^^^^^
-
-* If sheet is protected with password.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.is_protected)
-
-
-Set password
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.password = 'letmein'
- app.msgbox(sheet.is_protected)
-
-
-Remove password
-^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.password = 'letmein'
- app.msgbox(sheet.is_protected)
-
- sheet.unprotect('letmein')
- app.msgbox(sheet.is_protected)
-
-
-Tab color
-^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.color)
-
- sheet.color = 'red'
- app.msgbox(sheet.color)
-
- # RGB
- sheet.color = (125, 200, 10)
- app.msgbox(sheet.color)
-
-
-Document parent
-^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = sheet.doc
-
-
-Activate
-^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- # Get last sheet
- sheet = doc[-1]
-
- # Activate from doc
- doc.activate(sheet)
-
- # Activate from sheet
- sheet.activate()
-
-
-Ranges
-~~~~~~
-
-Cells
-^^^^^
-
-* By name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- cell = sheet['A1']
- app.msgbox(cell.name)
-
-
-* By position [row, column]
-
-.. code-block:: python
-
- cell = sheet[1, 4]
- app.msgbox(cell.name)
-
-
-Ranges
-^^^^^^
-
-* By name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['B2:D5']
- app.msgbox(rango.name)
-
-* By position [start_row:end_row, start_column:end_column]
-
-.. code-block:: python
-
- rango = sheet[1:5,1:4]
- app.msgbox(rango.name)
-
-* Group ranges
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc.active
- last = doc[-1]
- with doc.ranges as r:
- # Add one range
- r.add(sheet['A1:B2'])
- r2 = sheet['C4:D5']
- r3 = last['E7:D8']
- r4 = last['E10:F12']
- # Add multiple ranges
- r.add((r2, r3, r4))
- app.debug(r.names)
-
-* Get the same range in all sheets
-
-.. code-block:: python
-
- ranges = doc.get_ranges('A1:B1')
- app.debug(ranges.names)
-
-* Get columns by name.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['B:B']
- app.debug(rango.name)
-
- rango = sheet['D:F']
- app.debug(rango.name)
-
-* Get columns by position.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- # Column B
- rango = sheet[0:,1]
- app.debug(rango.name)
-
- # Columnas D:F
- rango = sheet[0:,3:6]
- app.debug(rango.name)
-
-
-* Get rows
-
-.. code-block:: python
-
- sheet = app.active_sheet
- # One row
- row = sheet[1]
- app.debug(row.name)
-
- # Range rows
- row = sheet[3:10,0:]
- app.debug(row.name)
-
-
-Info ranges
-^^^^^^^^^^^
-
-* Get absolute name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1:E10']
- app.msgbox(rango.name)
-
-* Get address
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1']
- a = rango.address
- data = f"""Cell Address
- Row: {a.Row}
- Column: {a.Column}
- """
- app.msgbox(data)
-
- rango = sheet['A1:E10']
- ra = rango.range_address
- data = (
- f'Range Address:\n\n'
- f'Star Row: {ra.StartRow}\n'
- f'End Row: {ra.EndRow}\n'
- f'Star Column: {ra.StartColumn}\n'
- f'End Column: {ra.EndColumn}\n'
- )
- app.msgbox(data)
-
-
-Special ranges
-^^^^^^^^^^^^^^
-
-* Get used area
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet.used_area
- app.msgbox(rango.name)
-
-* Get current region
-
-.. code-block:: python
-
- rango = sheet['A1'].current_region
- app.msgbox(rango.name)
-
-* Get next free cell
-
-.. code-block:: python
-
- cell = sheet['A1'].next_cell
- app.msgbox(cell.name)
-
-* Get merged area
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1'].merged_area
- app.msgbox(rango.name)
-
-* Get visible cells
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rangos = sheet['A1:E10'].visible
- for r in rangos:
- app.debug(r.name)
-
-* Get empty cells
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rangos = sheet['A1:E10'].empty
- for r in rangos:
- app.debug(r.name)
-
-
-Manipulate ranges
-~~~~~~~~~~~~~~~~~
+.. toctree::
+ :maxdepth: 2
+
+ calc_doc.rst
+ calc_sheets.rst
+ calc_ranges.rst
+ calc_ranges2.rst
+ calc_data.rst
diff --git a/doc/build/_sources/main/calc_data.rst.txt b/doc/build/_sources/main/calc_data.rst.txt
new file mode 100644
index 0000000..5a2382b
--- /dev/null
+++ b/doc/build/_sources/main/calc_data.rst.txt
@@ -0,0 +1,45 @@
+
+Data
+~~~~
+
+Read
+^^^^
+
+* Get value from cell, automatic detect type and get value.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A1']
+
+ value = cell.value
+ info = f'Cell Type = {cell.type}\n\nCell Value = {cell.value}'
+ app.msgbox(info)
+
+
+Write
+^^^^^
+
+* Automatic detect data type.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+
+ # ~ Set int
+ sheet['A1'].value = 1
+
+ # ~ Set float
+ sheet['A2'].value = 10.5
+
+ # ~ Set string
+ sheet['A3'].value = 'Damn World'
+
+ # ~ Set date
+ sheet['A4'].value = app.today()
+
+ # ~ Set time
+ sheet['A5'].value = app.now(True)
+
+ # ~ Set datetime
+ sheet['A6'].value = app.now()
diff --git a/doc/build/_sources/main/calc_doc.rst.txt b/doc/build/_sources/main/calc_doc.rst.txt
new file mode 100644
index 0000000..f3a5f26
--- /dev/null
+++ b/doc/build/_sources/main/calc_doc.rst.txt
@@ -0,0 +1,50 @@
+Document
+~~~~~~~~
+
+Current doc
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.type)
+
+
+Selection
+^^^^^^^^^
+
+* If selection is range get LOCalcRange, if selection is shape get LOShape, other selection get original pyuno object.
+
+.. code-block:: python
+
+ doc = app.active
+ selection = doc.selection
+ app.msgbox(type(selection))
+
+
+Headers
+^^^^^^^
+
+* Hide or show columns and rows headers.
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.headers)
+ doc.headers = not doc.headers
+ app.msgbox(doc.headers)
+ doc.headers = not doc.headers
+
+
+Tabs
+^^^^
+
+* Hide or show tab sheets.
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.tabs)
+ doc.tabs = not doc.tabs
+ app.msgbox(doc.tabs)
+ doc.tabs = not doc.tabs
diff --git a/doc/build/_sources/main/calc_ranges.rst.txt b/doc/build/_sources/main/calc_ranges.rst.txt
new file mode 100644
index 0000000..84a34ed
--- /dev/null
+++ b/doc/build/_sources/main/calc_ranges.rst.txt
@@ -0,0 +1,190 @@
+Cell and ranges
+~~~~~~~~~~~~~~~
+
+Cells
+^^^^^
+
+* By name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A1']
+ app.msgbox(cell.name)
+
+
+* By position [row, column]
+
+.. code-block:: python
+
+ cell = sheet[1, 4]
+ app.msgbox(cell.name)
+
+
+Ranges
+^^^^^^
+
+* By name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['B2:D5']
+ app.msgbox(rango.name)
+
+* By position [start_row:end_row, start_column:end_column]
+
+.. code-block:: python
+
+ rango = sheet[1:5,1:4]
+ app.msgbox(rango.name)
+
+* Group ranges
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc.active
+ last = doc[-1]
+ with doc.ranges as r:
+ # Add one range
+ r.add(sheet['A1:B2'])
+ r2 = sheet['C4:D5']
+ r3 = last['E7:D8']
+ r4 = last['E10:F12']
+ # Add multiple ranges
+ r.add((r2, r3, r4))
+ app.debug(r.names)
+
+* Get the same range in all sheets
+
+.. code-block:: python
+
+ ranges = doc.get_ranges('A1:B1')
+ app.debug(ranges.names)
+
+* Get columns by name.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['B:B']
+ app.debug(rango.name)
+
+ rango = sheet['D:F']
+ app.debug(rango.name)
+
+* Get columns by position.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ # Column B
+ rango = sheet[0:,1]
+ app.debug(rango.name)
+
+ # Columnas D:F
+ rango = sheet[0:,3:6]
+ app.debug(rango.name)
+
+
+* Get rows
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ # One row
+ row = sheet[1]
+ app.debug(row.name)
+
+ # Range rows
+ row = sheet[3:10,0:]
+ app.debug(row.name)
+
+
+Info ranges
+^^^^^^^^^^^
+
+* Get absolute name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:E10']
+ app.msgbox(rango.name)
+
+* Get address
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1']
+ a = rango.address
+ data = f"""Cell Address
+ Row: {a.Row}
+ Column: {a.Column}
+ """
+ app.msgbox(data)
+
+ rango = sheet['A1:E10']
+ ra = rango.range_address
+ data = (
+ f'Range Address:\n\n'
+ f'Star Row: {ra.StartRow}\n'
+ f'End Row: {ra.EndRow}\n'
+ f'Star Column: {ra.StartColumn}\n'
+ f'End Column: {ra.EndColumn}\n'
+ )
+ app.msgbox(data)
+
+
+Special ranges
+^^^^^^^^^^^^^^
+
+* Get used area
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet.used_area
+ app.msgbox(rango.name)
+
+* Get current region
+
+.. code-block:: python
+
+ rango = sheet['A1'].current_region
+ app.msgbox(rango.name)
+
+* Get next free cell
+
+.. code-block:: python
+
+ cell = sheet['A1'].next_cell
+ app.msgbox(cell.name)
+
+* Get merged area
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1'].merged_area
+ app.msgbox(rango.name)
+
+* Get visible cells
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rangos = sheet['A1:E10'].visible
+ for r in rangos:
+ app.debug(r.name)
+
+* Get empty cells
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rangos = sheet['A1:E10'].empty
+ for r in rangos:
+ app.debug(r.name)
diff --git a/doc/build/_sources/main/calc_ranges2.rst.txt b/doc/build/_sources/main/calc_ranges2.rst.txt
new file mode 100644
index 0000000..d58ea7d
--- /dev/null
+++ b/doc/build/_sources/main/calc_ranges2.rst.txt
@@ -0,0 +1,124 @@
+Manipulate ranges
+~~~~~~~~~~~~~~~~~
+
+**Not, not is necesary select range for manipulate**
+
+Select
+^^^^^^
+
+* Select from doc
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = app.active_sheet
+
+ cell = sheet['A1']
+ doc.select(cell)
+
+
+* Select in self range
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ rango.select()
+
+
+Move
+^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ rango.move(sheet['E6'])
+
+* Move to other sheet
+
+.. code-block:: python
+
+ rango.move(doc[-1]['E6'])
+
+
+Insert
+^^^^^^
+
+* Default insert down
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C1']
+ rango.insert()
+
+* Insert and move right
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.RIGHT)
+
+* Insert entire rows
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.ROWS)
+
+* Insert entire columns
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.COLUMNS)
+
+
+Delete
+^^^^^^
+
+* Default move up
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C1']
+ rango.delete()
+
+* Delete and move left
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.LEFT)
+
+* Delete entire rows
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.ROWS)
+
+* Delete entire columns
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.COLUMNS)
+
+
+Copy
+^^^^
+
+* Using native method `copyRange`, current range always should be a cell and source should be a range.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A5']
+ source = sheet['D1:E4']
+ cell.copy_from(source)
+
+* From range to cell
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ target = sheet['E1']
+ rango.copy_to(target)
diff --git a/doc/build/_sources/main/calc_sheets.rst.txt b/doc/build/_sources/main/calc_sheets.rst.txt
new file mode 100644
index 0000000..542a954
--- /dev/null
+++ b/doc/build/_sources/main/calc_sheets.rst.txt
@@ -0,0 +1,332 @@
+Sheets
+~~~~~~
+
+Active sheet
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.name)
+
+ # or
+ doc = app.active
+ sheet = doc.active
+
+
+Get by index
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc[0]
+ app.msgbox(sheet.name)
+
+
+Get by name
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc['Sheet1']
+ app.msgbox(sheet.name)
+
+
+Contains
+^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox('Sheet1' in doc)
+
+
+Get tuple with all names
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.names)
+
+
+Count
+^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(len(doc))
+
+New
+^^^
+
+* Always validate if new name not exists.
+
+.. code-block:: python
+
+ doc = app.active
+
+ sheet = doc.new_sheet()
+ # CAUTION: If 'NewSheet' exists, reset it to clean sheet.
+ doc['NewSheet'] = sheet
+
+ # ~ or
+
+ sheet = doc.insert('NewSheet2')
+
+* Insert multiple, get last insert.
+
+.. code-block:: python
+
+ names = ('One', 'Two', 'Three')
+ sheet = doc.insert(names)
+
+
+Move
+^^^^
+
+* Move by object to last position.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.move(sheet)
+
+* Move by name to last position.
+
+.. code-block:: python
+
+ doc.move('Sheet1')
+
+* Move to position.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.move(sheet, 2)
+
+* Move from sheet
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.move()
+
+* Move to position.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.move(2)
+
+
+Remove
+^^^^^^
+
+* Remove by object.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.remove(sheet)
+
+* Remove by name.
+
+.. code-block:: python
+
+ doc.remove('One')
+
+* Remove from sheet.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.remove()
+
+
+Copy
+^^^^
+
+* Copy inside the same spreadsheet.
+
+* By object
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.copy(sheet, 'OtherSheet')
+
+* By name
+
+.. code-block:: python
+
+ doc.copy('Sheet1', 'Sheet2')
+
+* From sheet
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.copy(sheet.name + '_2')
+
+
+Copy from
+^^^^^^^^^
+
+* Copy sheet from one spreadsheet to other.
+
+.. code-block:: python
+
+ doc = app.active
+ doc_source = app.docs['Contacts.ods']
+ name_source = 'Names'
+ name_target = 'Names'
+ position = 0
+ doc.copy_from(doc_source, name_source, name_target, position)
+
+
+Copy to
+^^^^^^^
+
+* Copy from sheet with the same name
+
+.. code-block:: python
+
+ doc = app.docs.new()
+ sheet = app.active_sheet
+ sheet.copy_to(doc)
+
+* Used new name
+
+.. code-block:: python
+
+ doc = app.docs.new()
+ sheet = app.active_sheet
+ sheet.copy_to(doc, 'NewName')
+
+
+Sort
+^^^^
+
+* Sort sheets by names.
+
+.. code-block:: python
+
+ doc = app.active
+ doc.sort()
+
+Name
+^^^^
+
+* Name visible by the user.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.name)
+ sheet.name = 'NewName'
+ app.msgbox(sheet.name)
+
+
+Code name
+^^^^^^^^^
+
+* Name only accessible by code.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.code_name)
+ sheet.code_name = 'my_name'
+ app.msgbox(sheet.code_name)
+
+
+Visible
+^^^^^^^
+
+* Apply only with spreadsheet with two or more sheets.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.visible)
+ sheet.visible = not sheet.visible
+ app.msgbox(sheet.visible)
+ sheet.visible = not sheet.visible
+
+
+Is protected
+^^^^^^^^^^^^
+
+* If sheet is protected with password.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.is_protected)
+
+
+Set password
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.password = 'letmein'
+ app.msgbox(sheet.is_protected)
+
+
+Remove password
+^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.password = 'letmein'
+ app.msgbox(sheet.is_protected)
+
+ sheet.unprotect('letmein')
+ app.msgbox(sheet.is_protected)
+
+
+Tab color
+^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.color)
+
+ sheet.color = 'red'
+ app.msgbox(sheet.color)
+
+ # RGB
+ sheet.color = (125, 200, 10)
+ app.msgbox(sheet.color)
+
+
+Document parent
+^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = sheet.doc
+
+
+Activate
+^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ # Get last sheet
+ sheet = doc[-1]
+
+ # Activate from doc
+ doc.activate(sheet)
+
+ # Activate from sheet
+ sheet.activate()
diff --git a/doc/build/main/calc.html b/doc/build/main/calc.html
index bd4d299..6a1d3ff 100644
--- a/doc/build/main/calc.html
+++ b/doc/build/main/calc.html
@@ -15,7 +15,7 @@
-
+
@@ -39,544 +39,62 @@
-
-Document
-
-Current doc
-doc = app . active
-app . msgbox ( doc . type )
-
-
-
-
-Selection
-
-If selection is range get LOCalcRange, if selection is shape get LOShape, other selection get original pyuno object.
+
+
+Document
-doc = app . active
-selection = doc . selection
-app . msgbox ( type ( selection ))
-
-
-
-
+Sheets
-doc = app . active
-app . msgbox ( doc . headers )
-doc . headers = not doc . headers
-app . msgbox ( doc . headers )
-doc . headers = not doc . headers
-
-
-
-
-Tabs
-
-Hide or show tab sheets.
+
+Cell and ranges
-doc = app . active
-app . msgbox ( doc . tabs )
-doc . tabs = not doc . tabs
-app . msgbox ( doc . tabs )
-doc . tabs = not doc . tabs
-
-
-
-
-
-Sheets
-
-Active sheet
-sheet = app . active_sheet
-app . msgbox ( sheet . name )
-
-# or
-doc = app . active
-sheet = doc . active
-
-
-
-
-Get by index
-doc = app . active
-sheet = doc [ 0 ]
-app . msgbox ( sheet . name )
-
-
-
-
-Get by name
-doc = app . active
-sheet = doc [ 'Sheet1' ]
-app . msgbox ( sheet . name )
-
-
-
-
-Contains
-doc = app . active
-app . msgbox ( 'Sheet1' in doc )
-
-
-
-
-Get tuple with all names
-doc = app . active
-app . msgbox ( doc . names )
-
-
-
-
-Count
-doc = app . active
-app . msgbox ( len ( doc ))
-
-
-
-
+Manipulate ranges
-doc = app . active
-
-sheet = doc . new_sheet ()
-# CAUTION: If 'NewSheet' exists, reset it to clean sheet.
-doc [ 'NewSheet' ] = sheet
-
-# ~ or
-
-sheet = doc . insert ( 'NewSheet2' )
-
-
-
+Data
-names = ( 'One' , 'Two' , 'Three' )
-sheet = doc . insert ( names )
-
-
-
-
-
sheet = doc [ 0 ]
-doc . move ( sheet )
-
-
-
-
-
sheet = doc [ 0 ]
-doc . move ( sheet , 2 )
-
-
-
-
sheet = app . active_sheet
-sheet . move ()
-
-
-
-
sheet = app . active_sheet
-sheet . move ( 2 )
-
-
-
-
-Remove
-
-sheet = doc [ 0 ]
-doc . remove ( sheet )
-
-
-
-
-
-sheet = app . active_sheet
-sheet . remove ()
-
-
-
-
-Copy
-
-sheet = doc [ 0 ]
-doc . copy ( sheet , 'OtherSheet' )
-
-
-
-doc . copy ( 'Sheet1' , 'Sheet2' )
-
-
-
-sheet = app . active_sheet
-sheet . copy ( sheet . name + '_2' )
-
-
-
-
-Copy from
-
-doc = app . active
-doc_source = app . docs [ 'Contacts.ods' ]
-name_source = 'Names'
-name_target = 'Names'
-position = 0
-doc . copy_from ( doc_source , name_source , name_target , position )
-
-
-
-
-Copy to
-
-doc = app . docs . new ()
-sheet = app . active_sheet
-sheet . copy_to ( doc )
-
-
-
-doc = app . docs . new ()
-sheet = app . active_sheet
-sheet . copy_to ( doc , 'NewName' )
-
-
-
-
-Sort
-
-doc = app . active
-doc . sort ()
-
-
-
-
-Name
-
-sheet = app . active_sheet
-app . msgbox ( sheet . name )
-sheet . name = 'NewName'
-app . msgbox ( sheet . name )
-
-
-
-
-Code name
-
-sheet = app . active_sheet
-app . msgbox ( sheet . code_name )
-sheet . code_name = 'my_name'
-app . msgbox ( sheet . code_name )
-
-
-
-
-Visible
-
-sheet = app . active_sheet
-app . msgbox ( sheet . visible )
-sheet . visible = not sheet . visible
-app . msgbox ( sheet . visible )
-sheet . visible = not sheet . visible
-
-
-
-
-Is protected
-
-sheet = app . active_sheet
-app . msgbox ( sheet . is_protected )
-
-
-
-
-Set password
-sheet = app . active_sheet
-sheet . password = 'letmein'
-app . msgbox ( sheet . is_protected )
-
-
-
-
-Remove password
-sheet = app . active_sheet
-sheet . password = 'letmein'
-app . msgbox ( sheet . is_protected )
-
-sheet . unprotect ( 'letmein' )
-app . msgbox ( sheet . is_protected )
-
-
-
-
-Tab color
-sheet = app . active_sheet
-app . msgbox ( sheet . color )
-
-sheet . color = 'red'
-app . msgbox ( sheet . color )
-
-# RGB
-sheet . color = ( 125 , 200 , 10 )
-app . msgbox ( sheet . color )
-
-
-
-
-
-Activate
-doc = app . active
-# Get last sheet
-sheet = doc [ - 1 ]
-
-# Activate from doc
-doc . activate ( sheet )
-
-# Activate from sheet
-sheet . activate ()
-
-
-
-
-
-Ranges
-
-Cells
-
-sheet = app . active_sheet
-cell = sheet [ 'A1' ]
-app . msgbox ( cell . name )
-
-
-
-cell = sheet [ 1 , 4 ]
-app . msgbox ( cell . name )
-
-
-
-
-Ranges
-
-sheet = app . active_sheet
-rango = sheet [ 'B2:D5' ]
-app . msgbox ( rango . name )
-
-
-
-rango = sheet [ 1 : 5 , 1 : 4 ]
-app . msgbox ( rango . name )
-
-
-
-doc = app . active
-sheet = doc . active
-last = doc [ - 1 ]
-with doc . ranges as r :
- # Add one range
- r . add ( sheet [ 'A1:B2' ])
- r2 = sheet [ 'C4:D5' ]
- r3 = last [ 'E7:D8' ]
- r4 = last [ 'E10:F12' ]
- # Add multiple ranges
- r . add (( r2 , r3 , r4 ))
- app . debug ( r . names )
-
-
-
-ranges = doc . get_ranges ( 'A1:B1' )
-app . debug ( ranges . names )
-
-
-
-sheet = app . active_sheet
-rango = sheet [ 'B:B' ]
-app . debug ( rango . name )
-
-rango = sheet [ 'D:F' ]
-app . debug ( rango . name )
-
-
-
-Get columns by position.
-
-sheet = app . active_sheet
-# Column B
-rango = sheet [ 0 :, 1 ]
-app . debug ( rango . name )
-
-# Columnas D:F
-rango = sheet [ 0 :, 3 : 6 ]
-app . debug ( rango . name )
-
-
-
-sheet = app . active_sheet
-# One row
-row = sheet [ 1 ]
-app . debug ( row . name )
-
-# Range rows
-row = sheet [ 3 : 10 , 0 :]
-app . debug ( row . name )
-
-
-
-
-Info ranges
-
-sheet = app . active_sheet
-rango = sheet [ 'A1:E10' ]
-app . msgbox ( rango . name )
-
-
-
-sheet = app . active_sheet
-rango = sheet [ 'A1' ]
-a = rango . address
-data = f """Cell Address
-Row: { a . Row }
-Column: { a . Column }
-"""
-app . msgbox ( data )
-
-rango = sheet [ 'A1:E10' ]
-ra = rango . range_address
-data = (
- f 'Range Address: \n\n '
- f 'Star Row: { ra . StartRow } \n '
- f 'End Row: { ra . EndRow } \n '
- f 'Star Column: { ra . StartColumn } \n '
- f 'End Column: { ra . EndColumn } \n '
-)
-app . msgbox ( data )
-
-
-
-
-Special ranges
-
-sheet = app . active_sheet
-rango = sheet . used_area
-app . msgbox ( rango . name )
-
-
-
-rango = sheet [ 'A1' ] . current_region
-app . msgbox ( rango . name )
-
-
-
-cell = sheet [ 'A1' ] . next_cell
-app . msgbox ( cell . name )
-
-
-
-sheet = app . active_sheet
-rango = sheet [ 'A1' ] . merged_area
-app . msgbox ( rango . name )
-
-
-
-sheet = app . active_sheet
-rangos = sheet [ 'A1:E10' ] . visible
-for r in rangos :
- app . debug ( r . name )
-
-
-
-sheet = app . active_sheet
-rangos = sheet [ 'A1:E10' ] . empty
-for r in rangos :
- app . debug ( r . name )
-
-
-
-
-
@@ -621,7 +139,7 @@
Documentation overview
diff --git a/doc/build/main/calc_data.html b/doc/build/main/calc_data.html
new file mode 100644
index 0000000..3a5eccf
--- /dev/null
+++ b/doc/build/main/calc_data.html
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
Data — ZAZ documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Data
+
+Read
+
+sheet = app . active_sheet
+cell = sheet [ 'A1' ]
+
+value = cell . value
+info = f 'Cell Type = { cell . type } \n\n Cell Value = { cell . value } '
+app . msgbox ( info )
+
+
+
+
+Write
+
+sheet = app . active_sheet
+
+# ~ Set int
+sheet [ 'A1' ] . value = 1
+
+# ~ Set float
+sheet [ 'A2' ] . value = 10.5
+
+# ~ Set string
+sheet [ 'A3' ] . value = 'Damn World'
+
+# ~ Set date
+sheet [ 'A4' ] . value = app . today ()
+
+# ~ Set time
+sheet [ 'A5' ] . value = app . now ( True )
+
+# ~ Set datetime
+sheet [ 'A6' ] . value = app . now ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/build/main/calc_doc.html b/doc/build/main/calc_doc.html
new file mode 100644
index 0000000..7fe017d
--- /dev/null
+++ b/doc/build/main/calc_doc.html
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
Document — ZAZ documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Document
+
+Current doc
+doc = app . active
+app . msgbox ( doc . type )
+
+
+
+
+Selection
+
+doc = app . active
+selection = doc . selection
+app . msgbox ( type ( selection ))
+
+
+
+
+
+Tabs
+
+Hide or show tab sheets.
+
+doc = app . active
+app . msgbox ( doc . tabs )
+doc . tabs = not doc . tabs
+app . msgbox ( doc . tabs )
+doc . tabs = not doc . tabs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/build/main/calc_ranges.html b/doc/build/main/calc_ranges.html
new file mode 100644
index 0000000..6f9e56d
--- /dev/null
+++ b/doc/build/main/calc_ranges.html
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
Cell and ranges — ZAZ documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Cell and ranges
+
+Cells
+
+sheet = app . active_sheet
+cell = sheet [ 'A1' ]
+app . msgbox ( cell . name )
+
+
+
+cell = sheet [ 1 , 4 ]
+app . msgbox ( cell . name )
+
+
+
+
+Ranges
+
+sheet = app . active_sheet
+rango = sheet [ 'B2:D5' ]
+app . msgbox ( rango . name )
+
+
+
+rango = sheet [ 1 : 5 , 1 : 4 ]
+app . msgbox ( rango . name )
+
+
+
+doc = app . active
+sheet = doc . active
+last = doc [ - 1 ]
+with doc . ranges as r :
+ # Add one range
+ r . add ( sheet [ 'A1:B2' ])
+ r2 = sheet [ 'C4:D5' ]
+ r3 = last [ 'E7:D8' ]
+ r4 = last [ 'E10:F12' ]
+ # Add multiple ranges
+ r . add (( r2 , r3 , r4 ))
+ app . debug ( r . names )
+
+
+
+ranges = doc . get_ranges ( 'A1:B1' )
+app . debug ( ranges . names )
+
+
+
+sheet = app . active_sheet
+rango = sheet [ 'B:B' ]
+app . debug ( rango . name )
+
+rango = sheet [ 'D:F' ]
+app . debug ( rango . name )
+
+
+
+Get columns by position.
+
+sheet = app . active_sheet
+# Column B
+rango = sheet [ 0 :, 1 ]
+app . debug ( rango . name )
+
+# Columnas D:F
+rango = sheet [ 0 :, 3 : 6 ]
+app . debug ( rango . name )
+
+
+
+sheet = app . active_sheet
+# One row
+row = sheet [ 1 ]
+app . debug ( row . name )
+
+# Range rows
+row = sheet [ 3 : 10 , 0 :]
+app . debug ( row . name )
+
+
+
+
+Info ranges
+
+sheet = app . active_sheet
+rango = sheet [ 'A1:E10' ]
+app . msgbox ( rango . name )
+
+
+
+sheet = app . active_sheet
+rango = sheet [ 'A1' ]
+a = rango . address
+data = f """Cell Address
+Row: { a . Row }
+Column: { a . Column }
+"""
+app . msgbox ( data )
+
+rango = sheet [ 'A1:E10' ]
+ra = rango . range_address
+data = (
+ f 'Range Address: \n\n '
+ f 'Star Row: { ra . StartRow } \n '
+ f 'End Row: { ra . EndRow } \n '
+ f 'Star Column: { ra . StartColumn } \n '
+ f 'End Column: { ra . EndColumn } \n '
+)
+app . msgbox ( data )
+
+
+
+
+Special ranges
+
+sheet = app . active_sheet
+rango = sheet . used_area
+app . msgbox ( rango . name )
+
+
+
+rango = sheet [ 'A1' ] . current_region
+app . msgbox ( rango . name )
+
+
+
+cell = sheet [ 'A1' ] . next_cell
+app . msgbox ( cell . name )
+
+
+
+sheet = app . active_sheet
+rango = sheet [ 'A1' ] . merged_area
+app . msgbox ( rango . name )
+
+
+
+sheet = app . active_sheet
+rangos = sheet [ 'A1:E10' ] . visible
+for r in rangos :
+ app . debug ( r . name )
+
+
+
+sheet = app . active_sheet
+rangos = sheet [ 'A1:E10' ] . empty
+for r in rangos :
+ app . debug ( r . name )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/build/main/calc_ranges2.html b/doc/build/main/calc_ranges2.html
new file mode 100644
index 0000000..9185117
--- /dev/null
+++ b/doc/build/main/calc_ranges2.html
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
Manipulate ranges — ZAZ documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Manipulate ranges
+Not, not is necesary select range for manipulate
+
+Select
+
+doc = app . active
+sheet = app . active_sheet
+
+cell = sheet [ 'A1' ]
+doc . select ( cell )
+
+
+
+sheet = app . active_sheet
+rango = sheet [ 'A1:C5' ]
+rango . select ()
+
+
+
+
+Move
+sheet = app . active_sheet
+rango = sheet [ 'A1:C5' ]
+rango . move ( sheet [ 'E6' ])
+
+
+
+rango . move ( doc [ - 1 ][ 'E6' ])
+
+
+
+
+Insert
+
+sheet = app . active_sheet
+rango = sheet [ 'A1:C1' ]
+rango . insert ()
+
+
+
+rango . insert ( app . CellInsertMode . RIGHT )
+
+
+
+rango . insert ( app . CellInsertMode . ROWS )
+
+
+
+rango . insert ( app . CellInsertMode . COLUMNS )
+
+
+
+
+Delete
+
+sheet = app . active_sheet
+rango = sheet [ 'A1:C1' ]
+rango . delete ()
+
+
+
+rango . delete ( app . CellDeleteMode . LEFT )
+
+
+
+rango . delete ( app . CellDeleteMode . ROWS )
+
+
+
+rango . delete ( app . CellDeleteMode . COLUMNS )
+
+
+
+
+Copy
+
+sheet = app . active_sheet
+cell = sheet [ 'A5' ]
+source = sheet [ 'D1:E4' ]
+cell . copy_from ( source )
+
+
+
+sheet = app . active_sheet
+rango = sheet [ 'A1:C5' ]
+target = sheet [ 'E1' ]
+rango . copy_to ( target )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/build/main/calc_sheets.html b/doc/build/main/calc_sheets.html
new file mode 100644
index 0000000..e48c4fc
--- /dev/null
+++ b/doc/build/main/calc_sheets.html
@@ -0,0 +1,426 @@
+
+
+
+
+
+
+
+
+
Sheets — ZAZ documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Sheets
+
+Active sheet
+sheet = app . active_sheet
+app . msgbox ( sheet . name )
+
+# or
+doc = app . active
+sheet = doc . active
+
+
+
+
+Get by index
+doc = app . active
+sheet = doc [ 0 ]
+app . msgbox ( sheet . name )
+
+
+
+
+Get by name
+doc = app . active
+sheet = doc [ 'Sheet1' ]
+app . msgbox ( sheet . name )
+
+
+
+
+Contains
+doc = app . active
+app . msgbox ( 'Sheet1' in doc )
+
+
+
+
+Get tuple with all names
+doc = app . active
+app . msgbox ( doc . names )
+
+
+
+
+Count
+doc = app . active
+app . msgbox ( len ( doc ))
+
+
+
+
+New
+
+doc = app . active
+
+sheet = doc . new_sheet ()
+# CAUTION: If 'NewSheet' exists, reset it to clean sheet.
+doc [ 'NewSheet' ] = sheet
+
+# ~ or
+
+sheet = doc . insert ( 'NewSheet2' )
+
+
+
+names = ( 'One' , 'Two' , 'Three' )
+sheet = doc . insert ( names )
+
+
+
+
+Move
+
+sheet = doc [ 0 ]
+doc . move ( sheet )
+
+
+
+
+
+sheet = doc [ 0 ]
+doc . move ( sheet , 2 )
+
+
+
+sheet = app . active_sheet
+sheet . move ()
+
+
+
+sheet = app . active_sheet
+sheet . move ( 2 )
+
+
+
+
+Remove
+
+sheet = doc [ 0 ]
+doc . remove ( sheet )
+
+
+
+
+
+sheet = app . active_sheet
+sheet . remove ()
+
+
+
+
+Copy
+
+sheet = doc [ 0 ]
+doc . copy ( sheet , 'OtherSheet' )
+
+
+
+doc . copy ( 'Sheet1' , 'Sheet2' )
+
+
+
+sheet = app . active_sheet
+sheet . copy ( sheet . name + '_2' )
+
+
+
+
+Copy from
+
+doc = app . active
+doc_source = app . docs [ 'Contacts.ods' ]
+name_source = 'Names'
+name_target = 'Names'
+position = 0
+doc . copy_from ( doc_source , name_source , name_target , position )
+
+
+
+
+Copy to
+
+doc = app . docs . new ()
+sheet = app . active_sheet
+sheet . copy_to ( doc )
+
+
+
+doc = app . docs . new ()
+sheet = app . active_sheet
+sheet . copy_to ( doc , 'NewName' )
+
+
+
+
+Sort
+
+doc = app . active
+doc . sort ()
+
+
+
+
+Name
+
+sheet = app . active_sheet
+app . msgbox ( sheet . name )
+sheet . name = 'NewName'
+app . msgbox ( sheet . name )
+
+
+
+
+Code name
+
+sheet = app . active_sheet
+app . msgbox ( sheet . code_name )
+sheet . code_name = 'my_name'
+app . msgbox ( sheet . code_name )
+
+
+
+
+Visible
+
+sheet = app . active_sheet
+app . msgbox ( sheet . visible )
+sheet . visible = not sheet . visible
+app . msgbox ( sheet . visible )
+sheet . visible = not sheet . visible
+
+
+
+
+Is protected
+
+sheet = app . active_sheet
+app . msgbox ( sheet . is_protected )
+
+
+
+
+Set password
+sheet = app . active_sheet
+sheet . password = 'letmein'
+app . msgbox ( sheet . is_protected )
+
+
+
+
+Remove password
+sheet = app . active_sheet
+sheet . password = 'letmein'
+app . msgbox ( sheet . is_protected )
+
+sheet . unprotect ( 'letmein' )
+app . msgbox ( sheet . is_protected )
+
+
+
+
+Tab color
+sheet = app . active_sheet
+app . msgbox ( sheet . color )
+
+sheet . color = 'red'
+app . msgbox ( sheet . color )
+
+# RGB
+sheet . color = ( 125 , 200 , 10 )
+app . msgbox ( sheet . color )
+
+
+
+
+
+Activate
+doc = app . active
+# Get last sheet
+sheet = doc [ - 1 ]
+
+# Activate from doc
+doc . activate ( sheet )
+
+# Activate from sheet
+sheet . activate ()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/build/main/easymacro.html b/doc/build/main/easymacro.html
index e7d231d..773c409 100644
--- a/doc/build/main/easymacro.html
+++ b/doc/build/main/easymacro.html
@@ -140,10 +140,11 @@
Calc
Writer
diff --git a/doc/build/objects.inv b/doc/build/objects.inv
index ffdefbf..6bef283 100644
Binary files a/doc/build/objects.inv and b/doc/build/objects.inv differ
diff --git a/doc/build/searchindex.js b/doc/build/searchindex.js
index 4c5a8a7..5ee5c96 100644
--- a/doc/build/searchindex.js
+++ b/doc/build/searchindex.js
@@ -1 +1 @@
-Search.setIndex({docnames:["index","main/apendixes","main/application","main/base","main/calc","main/config","main/easymacro","main/email","main/examples","main/examples_app","main/examples_base","main/examples_calc","main/examples_draw","main/examples_writer","main/intro","main/paths","main/tools","main/tools_for_debug","main/writer"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["index.rst","main/apendixes.rst","main/application.rst","main/base.rst","main/calc.rst","main/config.rst","main/easymacro.rst","main/email.rst","main/examples.rst","main/examples_app.rst","main/examples_base.rst","main/examples_calc.rst","main/examples_draw.rst","main/examples_writer.rst","main/intro.rst","main/paths.rst","main/tools.rst","main/tools_for_debug.rst","main/writer.rst"],objects:{},objnames:{},objtypes:{},terms:{"0":[1,4,5,9,13,14,15,17],"008080":16,"02":14,"04":14,"06":[7,15,16],"07":14,"080315":16,"082211":16,"09":16,"0k":16,"1":[2,4,5,10,14,15,16,17],"10":[2,4,16],"100":11,"1090":1,"11":[14,16],"12":16,"125":[4,16],"126446":16,"128487":16,"13":[7,16],"14":16,"15":16,"16":16,"17":16,"18":16,"19":16,"2":[2,4,5,10,15,16,17],"20":[14,16],"200":[4,11,16],"2001":10,"2002":10,"2003":10,"2004":10,"2005":10,"2021":[7,14,15,16],"21":[15,16],"22":16,"23":[7,14,16],"24":[7,15],"26":[7,16],"27":16,"29":15,"3":[4,5,10,14,15],"30":7,"300":11,"34":16,"35":16,"3m":16,"4":[4,10,15,16],"40":14,"400":11,"41":14,"42":16,"43":[7,16],"46":16,"47":[15,16],"48":16,"495":7,"5":[4,10,16],"50":14,"500":[11,17],"53":[14,16],"6":[4,16],"7":14,"7iznrbyw":7,"8859":15,"9":5,"abstract":6,"case":16,"catch":6,"class":10,"default":[2,7,15,16],"do":15,"export":6,"extensi\u00f3n":5,"final":[1,14],"function":[14,17],"import":[1,2,3,4,6,7,10,15,16,17,18],"new":[1,5,6,10,12,14],"null":10,"opci\u00f3n":5,"public":5,"return":[2,9,10,11,12,13,16,17],"super":16,"true":[1,2,5,7,10,12,15,16],"while":2,A:5,And:17,By:4,FOR:5,For:[0,2,5,8,15,16],If:[4,5,6,7,17],In:[5,14,16],Is:[2,5,16],It:[5,6],Of:16,One:4,Ons:5,Or:15,The:5,To:6,With:[2,14],_2:4,a1:[1,4,11],a2:1,absolut:[4,5],academ:13,access:4,act:15,action:[15,16],activ:[2,6,13,17,18],active_sheet:[4,11],add:[4,5,14,15,17],addin:[5,14],addonmenu:5,address:[4,7],all:[0,2,5,7,15],along:5,alt:[5,9],alwai:[1,2,3,4,6,7,15,16,17,18],an:[6,15],ani:[2,5,6,7,16,17],apendix:[0,2],api:[6,15,16],app:[1,2,3,4,6,7,9,10,11,12,13,15,16,17,18],app_nam:[15,16],appli:4,applic:[0,5,6,8,16],april:11,apt:14,ar:[6,7,15,16],arbitrari:2,archlinux:14,area:4,arg:[2,16],argument:[2,5],ask:15,attach:7,automat:[5,11,17],autostyl:8,awt:2,b1:4,b2:4,b:[1,4,15],bar:2,base:[0,5,6,8],base_insert_data:10,base_select_data:10,basedatefield:10,basemodel:10,basic:[14,16],bcc:7,been:2,befor:[5,17],bergman:[7,10,16],best:16,better:[16,17],between:6,bin:[5,15],binari:6,blank:5,bmp:5,bodi:7,bool:5,born:10,both:16,box:6,build:15,bytesequ:1,c4:4,c:14,cach:15,calc:[0,2,5,6,8,9,14,15],calc_data_to_cel:11,calcul:[11,16],call:6,call_dispatch:2,call_macro:16,can:[2,5,6,7,10,14,15,16,17],captur:16,catch_except:17,caution:[2,4,15,16],cc:7,cd:[5,14],cell:8,chang:15,charfield:10,clean:4,client:7,clipboard:[2,8],clock:16,clone:14,close:[6,7,12],code:[5,6,17],code_nam:4,color:6,color_html:16,color_nam:16,color_rgb:16,column:4,columna:4,com:[1,2,7],command:[2,16],commandurl:9,common:2,complex:[6,16],compon:[5,14],compress:14,con:6,conf:[5,7,16],config:[7,15,16],configur:[0,6,7],confirm:15,connect:[3,7,10],contact:[4,10,16],contacto:10,contain:6,content:[2,15],context:[2,5,15],control:2,copi:[5,6,14,17],copy_from:4,copy_to:4,correctli:5,correo:7,cotillar:10,count:6,cours:[14,16],creat:[5,6,8,14],create_inst:2,create_t:10,cryptographi:16,csv:6,ctrl:[5,9],cuat:14,current:[5,6,16],current_region:4,custom:[6,8],d5:4,d8:4,d:4,danger:16,darkblu:16,darken:15,data:[1,2,4,6,8,9,16,17],data_to_dict:16,databas:[6,10],database_proxi:10,databaseproxi:10,date:[6,10,17],datetim:10,db:[3,10],de:5,debug:[0,2,4,6,7,9,15,16],decrypt:6,def:[2,9,10,11,12,13,16,17],defin:15,delet:[6,8],delete_menu:9,delin:15,descript:5,desktop1:2,desktop2:2,desktop:[2,16],detail:5,dev:14,develop:[5,6,14],dialog:2,dialogprovider2:2,dict:[7,10],dict_to_properti:16,dictionari:[5,6],difficult:17,digest:6,dir:6,dir_tmp:15,directli:[6,16],directori:[2,6,14],dispatch:6,displai:5,display_nam:5,displaynam:5,distribut:5,doc:[1,3,6,10,12,13,15],doc_sourc:4,document:[2,6,12,16],documentservic:1,docx:2,domain:14,don:[14,15],done:14,download:[14,15,16],draw:[0,2,5,8],drwxr:16,ds:2,dt:15,e10:4,e7:4,each:5,easi:16,easili:6,easymacro:[0,1,2,3,4,7,10,15,16,17,18],echochar:16,edit:5,either:5,el:5,elmau:[5,14,15],els:10,email:[0,6],empti:4,en:[1,5,6],enabl:1,encapsul:1,encapsulado:1,encod:15,encrypt:6,encrypt_decrypt:16,end:[2,4,16],end_column:4,end_row:4,endcolumn:4,endrow:4,ep:1,epoch:16,eps_encapsulated_postscript:1,epub:7,error:6,errorbox:16,es:[1,5],etc:2,even:5,everi:16,exactli:5,exampl:[0,2,5,9],excel_doc:2,except:6,execut:[6,10,16],exist:[2,4,6,10],exists_app:15,exit:15,ext:15,extens:[0,2,6,17],extensionnam:5,extern:6,extract:15,f12:4,f:[1,2,4,5,15],fals:[1,2,10],februari:11,field:[1,7],file1:7,file2:7,file:[0,2,6,7,14],file_nam:[15,16],file_test:5,fileformatvers:1,filter:[0,6,15],filter_nam:2,filterservic:1,finish:16,first:0,fit:5,flag:1,folder:[5,7,15],fonda:10,fonst:6,font:2,forget:14,form:2,format:[2,5,6,7,16],foundat:5,frame:2,free:[2,4,5],fresh:14,from:[2,6,7,8,10,14],from_csv:15,from_id:15,from_json:15,galleri:2,gandi:7,gener:[5,14],get:[0,6,10],get_color:16,get_config:16,get_desktop:2,get_dir:15,get_epoch:16,get_fil:15,get_filt:[1,2],get_font:2,get_json:16,get_queri:10,get_rang:4,git:14,gnome:16,gnu:[5,16],gran:5,great:5,group:4,ha:2,happi:6,have:[5,17],he:15,header:1,hello:[7,16],hi:15,hidden:[2,7,12,16],hide:[2,4],himself:15,home:[2,3,5,6,7,10,12,16,17],hope:5,html:15,http:[5,14,16],httpx:16,i18n:5,i:[2,7,14,16],id:[6,10],id_ext:15,id_fold:15,id_par:15,idea:15,identityfield:10,idl:5,idlc:5,imag:[5,8,15],immedi:15,impli:5,impress:[2,5],impress_eps_export:1,includ:5,index:[0,9,15],info:[5,6,9,14],info_debug:[6,9,16],inform:[15,17],ingrid:[7,10,16],init:15,initi:10,inputbox:6,insert:[4,8,9],insert_menu_in_calc:9,insid:4,instal:[0,5,6,10,16,17],instanc:[1,6],instruct:15,integ:5,intern:[2,5],introduct:0,invers:5,ipifi:16,is_dir:15,is_fil:15,is_mac:16,is_protect:4,is_win:16,iso:15,issu:17,iter:6,jane:10,januari:11,jefferson:15,join:6,json:6,json_dump:16,json_load:16,jun:16,kei:5,keyboard:5,kill:15,kim:10,know:15,label:[5,9],lang:16,languag:[5,16],languaj:16,last:4,later:5,layer:6,legacy_table_nam:10,len:[2,4],lessen:15,letmein:[2,4,16],letter_lov:16,lh:16,lib:5,librari:[0,1,2,3,4,7,9,15,16,18],libre_offic:15,libreoffic:[2,5,6,7,14,16,17],license_:5,license_en:5,light:15,like:5,limit:2,line:[2,16],link:5,linux:16,list:6,list_of_list:16,local:[7,14],localcrang:4,log:6,logo:[5,15],look:[2,5,16],loren:[7,10],loshap:4,love:7,ls:16,lu20665x29msz:15,m:9,mac:16,macro:[5,6,8,9,14],mai:[11,16],mail1:7,mail2:7,mail3:7,mail:7,main:[2,16],major:6,make:[6,8,14],manag:5,mandatori:1,mani:2,manipul:6,march:11,marion:10,mau:[2,3,5,7,10,12,15,16,17],mbox:7,md:15,me:15,measur:16,member:15,memori:2,menu:8,menu_main:5,merchant:5,merg:[4,15],merge_zip:15,merged_area:4,messag:[6,7],message1:7,message2:7,meta:10,method:[6,15],mi:5,mine:15,model:10,modifi:[2,5],modul:[0,16],module1:16,month:11,more:[4,5,6,7,15,16],move:[5,14],mri:6,msg:[2,17],msgbox:[2,3,4,6,9,12,15,16,17,18],multi:5,multipl:[4,15],mx:7,my:[0,5,9,16,17],my_app:16,my_extens:16,my_nam:4,mydoc:2,myfil:[2,15],myfirstextens:14,myfirstextension_v0:14,mygreatextens:5,mymacro:9,n:[4,5,7,14,15],name:[1,6,9,10,15,16,17],name_16:5,name_26:5,name_sourc:4,name_target:4,nbest:7,need:[10,16,17],net:[5,7,14,15],new_nam:15,new_path:2,new_sheet:4,newnam:4,newsheet2:4,newsheet:4,next:4,next_cel:4,noexist:7,nombr:5,none:16,normal:[5,16],nosoffic:15,novak:10,now:[14,15,16],nwho:7,obj:[6,17],object:[2,4,6,17],od:[2,4,5,15],odb:[3,10],odt:[2,15,16],officemenubar:5,ok:16,one:[4,5,7,15,17],onli:[2,4,5,16],open:[5,6,12,17],oper:16,option1:5,option:[5,15],org:[5,16],origin:[2,4,6],os:[15,16],other:[2,4,7,15,16],other_nam:[2,15],othersheet:4,ott:15,our:[],out:16,output:16,overview:0,oxt:[14,15],p:15,pacman:14,page:[0,5],paramet:0,parent:[],part:5,particular:5,pass:5,password:[2,7,16],past:12,path:[0,3,6,7,10,12,16],path_dir:15,path_fil:15,path_hom:15,path_new:15,path_pygettext:5,path_python:15,path_sav:7,path_temp:15,path_tmp:15,path_url:15,path_zip:15,pathlib:15,pc:6,pdf:[6,15],peewe:10,pictur:[12,15,16],pip:10,planet:17,pleas:[5,17],png:[5,15,16],popen:16,port:7,posit:4,possibl:[5,7],postscript:1,pot:[5,14],present:1,presentationdocu:1,previous:2,print:[2,10],privat:16,probabl:6,problem:17,process:17,product:[8,17],program:6,project:[5,14,15,16,17],properti:[5,6],protect:[],provid:14,prueba:5,publish:5,purpos:5,py:[0,2,5,14],python3:5,python:[6,14,16],pyuno:[2,4,17],queri:10,question:6,r2:4,r3:4,r4:4,r:[4,16,17],ra:4,rang:[2,6,11],range_address:4,rango:4,rapid:14,rdb:5,read:[2,6],read_bin:15,receiv:[5,15],recommend:[5,14],recurs:15,red:4,redistribut:5,regard:[7,16],region:4,regmerg:5,rel:5,rememb:[1,2,3,4,7,15,16,18],remerg:5,remov:9,render:6,replac:6,replace_ext:15,repositori:14,request:16,requir:0,reset:4,respond:7,result:[2,15,16],rgb:4,row:[4,10],rtf:2,run:16,run_in_thread:[2,16],runtimeuid:2,rw:16,s:[5,6,14],safe_for_delet:15,same:[4,5,15,16],save:[6,7,8,17],save_bin:15,save_data:16,save_image_from_clipboard:12,save_log:17,save_tmp:15,sb:2,script:14,sdk:[5,14],search:0,second:16,secret:16,secur:7,see:5,select:[6,8],semant:5,send:[6,16],send_email:7,sent:7,server:7,servic:2,set:[2,5,8,15],set_config:16,setvalu:2,sha256:16,sha512:16,shape:4,share:5,sheet1:4,sheet2:4,sheet:[0,6,11],shell:17,shift:[5,9],shortcut:[5,9],should:5,show:[2,4,5,6,9,17],show_info_debug:9,show_messag:16,show_tim:16,simpl:6,size:[11,15],sleep:[2,16],soffic:[5,15],sofia:10,softwar:5,sometim:17,sophia:7,sort:[],sourc:[14,15],space:5,spreadsheet:4,srv:[2,15],ssl:7,standard:16,star:[1,2,4],start:[2,5,14,16,17],start_clock:16,start_column:4,start_row:4,start_tim:16,startcolumn:4,startrow:4,statu:2,stop:16,stop_clock:16,stop_tim:16,string:[5,6],style:13,stylenam:2,sub:16,subdir:15,subdirectori:15,subject:7,submenu:9,successfulli:14,sudo:14,sun:[1,2],support:[2,14,16],svfilteroptionsdialog:1,svg:15,svtool:1,system:[6,16],t:[5,14,15],t_shift_mod1_mod2:5,tab:[],tabl:8,taper:15,target:[12,15],technic:16,temp:6,temp_dir:15,templat:16,templatenam:1,tempor:6,teresa:17,term:5,test:[2,10,14,15,16,17],text:[2,5,6,16],than:7,thi:[2,5,14,15,16,17],thing:2,thoma:15,thread:[2,6,7],three:[4,15,17],thunderbird:7,ticket:17,time:[6,17],timer:6,timer_nam:16,titl:[5,16],tmp:15,tmp_:15,to_csv:15,to_json:15,to_pdf:2,to_system:15,to_url:15,todai:16,token:16,too:[5,7,16],tool:[0,5,6,9],toolbar:5,toolkit:2,total:[11,16],tu:5,tupl:[5,6,10,15],tuple_of_tupl:16,two:[4,5,15],txt:[15,17],type:[1,3,4,6,16,18],type_extens:5,u:10,ubuntu:14,ui:2,uicompon:1,uinam:[1,2],under:5,uniqu:5,uno:[2,6],uno_packag:15,unopkg:[5,14],unprotect:4,unzip:6,update_status_bar:2,urd:5,url:[5,6],url_open:16,us:[1,2,4,5,6,7,8,14,15,16,17],use_local:5,used_area:4,user:[4,7,14,15,16],userdata:1,usr:5,utf8:15,v:5,valid:4,valor:5,valu:[2,5],variant:16,verifi:[6,17],version:16,video:16,vim:5,visibl:[],wai:[7,15],walk:15,walk_dir:15,want:[5,15],warn:6,warranti:5,we:7,web:16,what:5,when:[5,15],where:5,who:15,window:16,without:[2,5,15],wizard:5,work:16,writer:[0,2,5,6,8],writer_table_set_styl:13,www:5,x:16,xl:2,xlsx:2,xml:15,xpathset:15,xr:16,you:[2,5,6,7,10,14,15,16,17],your:[5,6,7,16,17],yournam:5,zaz:[5,9,14,15],zazeasymacro_v0:15,zip:6,zip_cont:15},titles:["Welcome to ZAZ\u2019s documentation!","Apendixes","Application","Base","Calc","Configuration","Library easymacro.py","Email","Examples","For Application","For Base","For Calc","For Draw","For Writer","Introduction","Paths and files","Tools","Tools for debug","Writer"],titleterms:{"catch":17,"default":5,"export":2,"function":5,"new":[2,3,4],For:[9,10,11,12,13],If:2,Is:4,To:2,activ:4,all:[1,4],ani:15,apendix:1,applic:[2,9,15],author:5,autostyl:13,base:[3,10],binari:15,box:[16,17],calc:[1,4,11],call:[2,16,17],cell:[4,11],clipboard:12,close:2,code:4,color:[4,16],configur:[5,15,16],contain:[2,4],content:[0,6,8],copi:[2,4,15],count:[2,4],creat:[2,10],csv:15,current:[2,4,18],custom:9,data:[10,11,15],databas:3,date:16,debug:17,decrypt:16,delet:[9,15],dictionari:16,digest:16,dir:[2,15],directori:15,dispatch:2,doc:[2,4,18],document:[0,4,15],domain:5,draw:12,easymacro:6,email:7,encrypt:16,error:[16,17],exampl:8,except:17,execut:15,exist:15,extens:[5,14,15],extern:16,file:[5,15,17],file_nam:2,filter:[1,2],first:14,fonst:2,format:15,from:[4,12,15,16],get:[1,2,4,15,16],header:4,home:15,icon:5,id:[5,15],imag:12,index:4,indic:0,info:[4,15,16,17],info_debug:17,inform:5,inputbox:16,insert:10,instal:[14,15],instanc:2,introduct:14,is_modifi:2,is_read_onli:2,is_sav:2,iter:2,join:15,json:[15,16],librari:6,libreoffic:15,licens:5,list:16,local:5,log:17,macro:16,main:5,make:[9,16],manipul:4,menu:[5,9],messag:[16,17],method:2,move:4,mri:17,my:14,name:[2,4,5],obj:2,open:[2,15,16],overview:14,paramet:5,parent:[4,5],password:4,past:2,path:[2,5,15],pc:16,pdf:2,program:[5,16],properti:[2,16],protect:4,py:6,pygettext:5,python:15,question:16,rang:4,read:15,remov:4,render:16,replac:15,requir:14,s:0,save:[2,12,15,16],select:[2,4,10,15],send:7,set:[4,13],set_focu:2,sheet:[1,4],show:16,simpl:16,sort:4,special:4,status_bar:2,string:16,system:15,tab:4,tabl:[0,10,13],temp:15,tempor:15,test:5,text:15,thread:16,time:16,timer:16,titl:2,tool:[16,17],tupl:[4,16],type:[2,5,15],uid:2,unzip:15,url:[15,16],verifi:15,version:5,visibl:[2,4],warn:16,welcom:0,writer:[13,18],zaz:0,zip:15,zoom:2}})
\ No newline at end of file
+Search.setIndex({docnames:["index","main/apendixes","main/application","main/base","main/calc","main/calc_data","main/calc_doc","main/calc_ranges","main/calc_ranges2","main/calc_sheets","main/config","main/easymacro","main/email","main/examples","main/examples_app","main/examples_base","main/examples_calc","main/examples_draw","main/examples_writer","main/intro","main/paths","main/tools","main/tools_for_debug","main/writer"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["index.rst","main/apendixes.rst","main/application.rst","main/base.rst","main/calc.rst","main/calc_data.rst","main/calc_doc.rst","main/calc_ranges.rst","main/calc_ranges2.rst","main/calc_sheets.rst","main/config.rst","main/easymacro.rst","main/email.rst","main/examples.rst","main/examples_app.rst","main/examples_base.rst","main/examples_calc.rst","main/examples_draw.rst","main/examples_writer.rst","main/intro.rst","main/paths.rst","main/tools.rst","main/tools_for_debug.rst","main/writer.rst"],objects:{},objnames:{},objtypes:{},terms:{"0":[1,7,9,10,14,18,19,20,22],"008080":21,"02":19,"04":19,"06":[12,20,21],"07":19,"080315":21,"082211":21,"09":21,"0k":21,"1":[2,5,7,8,9,10,15,19,20,21,22],"10":[2,5,7,9,21],"100":16,"1090":1,"11":[19,21],"12":21,"125":[9,21],"126446":21,"128487":21,"13":[12,21],"14":21,"15":21,"16":21,"17":21,"18":21,"19":21,"2":[2,9,10,15,20,21,22],"20":[19,21],"200":[9,16,21],"2001":15,"2002":15,"2003":15,"2004":15,"2005":15,"2021":[12,19,20,21],"21":[20,21],"22":21,"23":[12,19,21],"24":[12,20],"26":[12,21],"27":21,"29":20,"3":[7,10,15,19,20],"30":12,"300":16,"34":21,"35":21,"3m":21,"4":[7,15,20,21],"40":19,"400":16,"41":19,"42":21,"43":[12,21],"46":21,"47":[20,21],"48":21,"495":12,"5":[5,7,15,21],"50":19,"500":[16,22],"53":[19,21],"6":[7,21],"7":19,"7iznrbyw":12,"8859":20,"9":10,"abstract":11,"case":21,"catch":11,"class":15,"default":[2,8,12,20,21],"do":20,"export":11,"extensi\u00f3n":10,"final":[1,19],"float":5,"function":[19,22],"import":[1,2,3,4,11,12,15,20,21,22,23],"int":5,"new":[1,4,10,11,15,17,19],"null":15,"opci\u00f3n":10,"public":10,"return":[2,14,15,16,17,18,21,22],"super":21,"true":[1,2,5,10,12,15,17,20,21],"while":2,A:10,And:22,By:[7,9],FOR:10,For:[0,2,10,13,20,21],If:[6,9,10,11,12,22],In:[10,19,21],Is:[2,4,10,21],It:[10,11],Not:8,Of:21,One:[7,9],Ons:10,Or:20,The:10,To:11,With:[2,19],_2:9,a1:[1,5,7,8,16],a2:[1,5],a3:5,a4:5,a5:[5,8],a6:5,absolut:[7,10],academ:18,access:9,act:20,action:[20,21],activ:[2,4,6,7,8,11,18,22,23],active_sheet:[5,7,8,9,16],add:[7,10,19,20,22],addin:[10,19],addonmenu:10,address:[7,12],all:[0,2,4,7,10,12,20],along:10,alt:[10,14],alwai:[1,2,3,4,8,9,11,12,20,21,22,23],an:[11,20],ani:[2,10,11,12,21,22],apendix:[0,2],api:[11,20,21],app:[1,2,3,4,5,6,7,8,9,11,12,14,15,16,17,18,20,21,22,23],app_nam:[20,21],appli:9,applic:[0,10,11,13,21],april:16,apt:19,ar:[11,12,20,21],arbitrari:2,archlinux:19,area:7,arg:[2,21],argument:[2,10],ask:20,attach:12,automat:[5,10,16,22],autostyl:13,awt:2,b1:7,b2:7,b:[1,7,20],bar:2,base:[0,10,11,13],base_insert_data:15,base_select_data:15,basedatefield:15,basemodel:15,basic:[19,21],bcc:12,been:2,befor:[10,22],bergman:[12,15,21],best:21,better:[21,22],between:11,bin:[10,20],binari:11,blank:10,bmp:10,bodi:12,bool:10,born:15,both:21,box:11,build:20,bytesequ:1,c1:8,c4:7,c5:8,c:19,cach:20,calc:[0,2,10,11,13,14,19,20],calc_data_to_cel:16,calcul:[16,21],call:11,call_dispatch:2,call_macro:21,can:[2,10,11,12,15,19,20,21,22],captur:21,catch_except:22,caution:[2,9,20,21],cc:12,cd:[10,19],cell:[4,5,8,11,13],celldeletemod:8,cellinsertmod:8,chang:20,charfield:15,clean:9,client:12,clipboard:[2,13],clock:21,clone:19,close:[11,12,17],code:[4,10,11,22],code_nam:9,color:[4,11],color_html:21,color_nam:21,color_rgb:21,column:[6,7,8],columna:7,com:[1,2,12],command:[2,21],commandurl:14,common:2,complex:[11,21],compon:[10,19],compress:19,con:11,conf:[10,12,21],config:[12,20,21],configur:[0,11,12],confirm:20,connect:[3,12,15],contact:[9,15,21],contacto:15,contain:[4,11],content:[2,20],context:[2,10,20],control:2,copi:[4,10,11,19,22],copy_from:[8,9],copy_to:[8,9],copyrang:8,correctli:10,correo:12,cotillar:15,count:[4,11],cours:[19,21],creat:[10,11,13,19],create_inst:2,create_t:15,cryptographi:21,csv:11,ctrl:[10,14],cuat:19,current:[4,7,8,10,11,21],current_region:7,custom:[11,13],d1:8,d5:7,d8:7,d:7,damn:5,danger:21,darkblu:21,darken:20,data:[1,2,4,7,11,13,14,21,22],data_to_dict:21,databas:[11,15],database_proxi:15,databaseproxi:15,date:[5,11,15,22],datetim:[5,15],db:[3,15],de:10,debug:[0,2,7,11,12,14,20,21],decrypt:11,def:[2,14,15,16,17,18,21,22],defin:20,delet:[4,11,13],delete_menu:14,delin:20,descript:10,desktop1:2,desktop2:2,desktop:[2,21],detail:10,detect:5,dev:19,develop:[10,11,19],dialog:2,dialogprovider2:2,dict:[12,15],dict_to_properti:21,dictionari:[10,11],difficult:22,digest:11,dir:11,dir_tmp:20,directli:[11,21],directori:[2,11,19],dispatch:11,displai:10,display_nam:10,displaynam:10,distribut:10,doc:[1,3,4,7,8,9,11,15,17,18,20],doc_sourc:9,document:[2,4,11,17,21],documentservic:1,docx:2,domain:19,don:[19,20],done:19,down:8,download:[19,20,21],draw:[0,2,10,13],drwxr:21,ds:2,dt:20,e10:7,e1:8,e4:8,e6:8,e7:7,each:10,easi:21,easili:11,easymacro:[0,1,2,3,4,12,15,20,21,22,23],echochar:21,edit:10,either:10,el:10,elmau:[10,19,20],els:15,email:[0,11],empti:7,en:[1,10,11],enabl:1,encapsul:1,encapsulado:1,encod:20,encrypt:11,encrypt_decrypt:21,end:[2,7,21],end_column:7,end_row:7,endcolumn:7,endrow:7,entir:8,ep:1,epoch:21,eps_encapsulated_postscript:1,epub:12,error:11,errorbox:21,es:[1,10],etc:2,even:10,everi:21,exactli:10,exampl:[0,2,10,14],excel_doc:2,except:11,execut:[11,15,21],exist:[2,9,11,15],exists_app:20,exit:20,ext:20,extens:[0,2,11,22],extensionnam:10,extern:11,extract:20,f12:7,f:[1,2,5,7,10,20],fals:[1,2,15],februari:16,field:[1,12],file1:12,file2:12,file:[0,2,11,12,19],file_nam:[20,21],file_test:10,fileformatvers:1,filter:[0,11,20],filter_nam:2,filterservic:1,finish:21,first:0,fit:10,flag:1,folder:[10,12,20],fonda:15,fonst:11,font:2,forget:19,form:2,format:[2,10,11,12,21],foundat:10,frame:2,free:[2,7,10],fresh:19,from:[2,4,5,8,11,12,13,15,19],from_csv:20,from_id:20,from_json:20,galleri:2,gandi:12,gener:[10,19],get:[0,4,5,6,7,11,15],get_color:21,get_config:21,get_desktop:2,get_dir:20,get_epoch:21,get_fil:20,get_filt:[1,2],get_font:2,get_json:21,get_queri:15,get_rang:7,git:19,gnome:21,gnu:[10,21],gran:10,great:10,group:7,ha:2,happi:11,have:[10,22],he:20,header:[1,4],hello:[12,21],hi:20,hidden:[2,12,17,21],hide:[2,6],himself:20,home:[2,3,10,11,12,15,17,21,22],hope:10,html:20,http:[10,19,21],httpx:21,i18n:10,i:[2,12,19,21],id:[11,15],id_ext:20,id_fold:20,id_par:20,idea:20,identityfield:15,idl:10,idlc:10,imag:[10,13,20],immedi:20,impli:10,impress:[2,10],impress_eps_export:1,includ:10,index:[0,4,14,20],info:[4,5,10,11,14,19],info_debug:[11,14,21],inform:[20,22],ingrid:[12,15,21],init:20,initi:15,inputbox:11,insert:[4,9,13,14],insert_menu_in_calc:14,insid:9,instal:[0,10,11,15,21,22],instanc:[1,11],instruct:20,integ:10,intern:[2,10],introduct:0,invers:10,ipifi:21,is_dir:20,is_fil:20,is_mac:21,is_protect:9,is_win:21,iso:20,issu:22,iter:11,jane:15,januari:16,jefferson:20,join:11,json:11,json_dump:21,json_load:21,jun:21,kei:10,keyboard:10,kill:20,kim:15,know:20,label:[10,14],lang:21,languag:[10,21],languaj:21,last:[7,9],later:10,layer:11,left:8,legacy_table_nam:15,len:[2,9],lessen:20,letmein:[2,9,21],letter_lov:21,lh:21,lib:10,librari:[0,1,2,3,4,12,14,20,21,23],libre_offic:20,libreoffic:[2,10,11,12,19,21,22],license_:10,license_en:10,light:20,like:10,limit:2,line:[2,21],link:10,linux:21,list:11,list_of_list:21,local:[12,19],localcrang:6,log:11,logo:[10,20],look:[2,10,21],loren:[12,15],loshap:6,love:12,ls:21,lu20665x29msz:20,m:14,mac:21,macro:[10,11,13,14,19],mai:[16,21],mail1:12,mail2:12,mail3:12,mail:12,main:[2,21],major:11,make:[11,13,19],manag:10,mandatori:1,mani:2,manipul:[4,11],march:16,marion:15,mau:[2,3,10,12,15,17,20,21,22],mbox:12,md:20,me:20,measur:21,member:20,memori:2,menu:13,menu_main:10,merchant:10,merg:[7,20],merge_zip:20,merged_area:7,messag:[11,12],message1:12,message2:12,meta:15,method:[8,11,20],mi:10,mine:20,model:15,modifi:[2,10],modul:[0,21],module1:21,month:16,more:[9,10,11,12,20,21],move:[4,10,19],mri:11,msg:[2,22],msgbox:[2,3,5,6,7,9,11,14,17,20,21,22,23],multi:10,multipl:[7,9,20],mx:12,my:[0,10,14,21,22],my_app:21,my_extens:21,my_nam:9,mydoc:2,myfil:[2,20],myfirstextens:19,myfirstextension_v0:19,mygreatextens:10,mymacro:14,n:[5,7,10,12,19,20],name:[1,4,7,11,14,15,20,21,22],name_16:10,name_26:10,name_sourc:9,name_target:9,nativ:8,nbest:12,ncell:5,necesari:8,need:[15,21,22],net:[10,12,19,20],new_nam:20,new_path:2,new_sheet:9,newnam:9,newsheet2:9,newsheet:9,next:7,next_cel:7,noexist:12,nombr:10,none:21,normal:[10,21],nosoffic:20,novak:15,now:[5,19,20,21],nwho:12,obj:[11,22],object:[2,6,9,11,22],od:[2,9,10,20],odb:[3,15],odt:[2,20,21],officemenubar:10,ok:21,one:[7,9,10,12,20,22],onli:[2,9,10,21],open:[10,11,17,22],oper:21,option1:10,option:[10,20],org:[10,21],origin:[2,6,11],os:[20,21],other:[2,6,8,9,12,20,21],other_nam:[2,20],othersheet:9,ott:20,our:[],out:21,output:21,overview:0,oxt:[19,20],p:20,pacman:19,page:[0,10],paramet:0,parent:4,part:10,particular:10,pass:10,password:[2,4,12,21],past:17,path:[0,3,11,12,15,17,21],path_dir:20,path_fil:20,path_hom:20,path_new:20,path_pygettext:10,path_python:20,path_sav:12,path_temp:20,path_tmp:20,path_url:20,path_zip:20,pathlib:20,pc:11,pdf:[11,20],peewe:15,pictur:[17,20,21],pip:15,planet:22,pleas:[10,22],png:[10,20,21],popen:21,port:12,posit:[7,9],possibl:[10,12],postscript:1,pot:[10,19],present:1,presentationdocu:1,previous:2,print:[2,15],privat:21,probabl:11,problem:22,process:22,product:[13,22],program:11,project:[10,19,20,21,22],properti:[10,11],protect:4,provid:19,prueba:10,publish:10,purpos:10,py:[0,2,10,19],python3:10,python:[11,19,21],pyuno:[2,6,22],queri:15,question:11,r2:7,r3:7,r4:7,r:[7,21,22],ra:7,rang:[2,4,6,11,16],range_address:7,rango:[7,8],rapid:19,rdb:10,read:[2,4,11],read_bin:20,receiv:[10,20],recommend:[10,19],recurs:20,red:9,redistribut:10,regard:[12,21],region:7,regmerg:10,rel:10,rememb:[1,2,3,4,12,20,21,23],remerg:10,remov:[4,14],render:11,replac:11,replace_ext:20,repositori:19,request:21,requir:0,reset:9,respond:12,result:[2,20,21],rgb:9,right:8,row:[6,7,8,15],rtf:2,run:21,run_in_thread:[2,21],runtimeuid:2,rw:21,s:[10,11,19],safe_for_delet:20,same:[7,9,10,20,21],save:[11,12,13,22],save_bin:20,save_data:21,save_image_from_clipboard:17,save_log:22,save_tmp:20,sb:2,script:19,sdk:[10,19],search:0,second:21,secret:21,secur:12,see:10,select:[4,11,13],self:8,semant:10,send:[11,21],send_email:12,sent:12,server:12,servic:2,set:[2,4,5,10,13,20],set_config:21,setvalu:2,sha256:21,sha512:21,shape:6,share:10,sheet1:9,sheet2:9,sheet:[0,4,5,6,7,8,11,16],shell:22,shift:[10,14],shortcut:[10,14],should:[8,10],show:[2,6,10,11,14,22],show_info_debug:14,show_messag:21,show_tim:21,simpl:11,size:[16,20],sleep:[2,21],soffic:[10,20],sofia:15,softwar:10,sometim:22,sophia:12,sort:4,sourc:[8,19,20],space:10,special:4,spreadsheet:9,srv:[2,20],ssl:12,standard:21,star:[1,2,7],start:[2,10,19,21,22],start_clock:21,start_column:7,start_row:7,start_tim:21,startcolumn:7,startrow:7,statu:2,stop:21,stop_clock:21,stop_tim:21,string:[5,10,11],style:18,stylenam:2,sub:21,subdir:20,subdirectori:20,subject:12,submenu:14,successfulli:19,sudo:19,sun:[1,2],support:[2,19,21],svfilteroptionsdialog:1,svg:20,svtool:1,system:[11,21],t:[10,19,20],t_shift_mod1_mod2:10,tab:4,tabl:13,taper:20,target:[8,17,20],technic:21,temp:11,temp_dir:20,templat:21,templatenam:1,tempor:11,teresa:22,term:10,test:[2,15,19,20,21,22],text:[2,10,11,21],than:12,thi:[2,10,19,20,21,22],thing:2,thoma:20,thread:[2,11,12],three:[9,20,22],thunderbird:12,ticket:22,time:[5,11,22],timer:11,timer_nam:21,titl:[10,21],tmp:20,tmp_:20,to_csv:20,to_json:20,to_pdf:2,to_system:20,to_url:20,todai:[5,21],token:21,too:[10,12,21],tool:[0,10,11,14],toolbar:10,toolkit:2,total:[16,21],tu:10,tupl:[4,10,11,15,20],tuple_of_tupl:21,two:[9,10,20],txt:[20,22],type:[1,3,5,6,11,21,23],type_extens:10,u:15,ubuntu:19,ui:2,uicompon:1,uinam:[1,2],under:10,uniqu:10,uno:[2,11],uno_packag:20,unopkg:[10,19],unprotect:9,unzip:11,up:8,update_status_bar:2,urd:10,url:[10,11],url_open:21,us:[1,2,7,8,9,10,11,12,13,19,20,21,22],use_local:10,used_area:7,user:[9,12,19,20,21],userdata:1,usr:10,utf8:20,v:10,valid:9,valor:10,valu:[2,5,10],variant:21,verifi:[11,22],version:21,video:21,vim:10,visibl:[4,7],wai:[12,20],walk:20,walk_dir:20,want:[10,20],warn:11,warranti:10,we:12,web:21,what:10,when:[10,20],where:10,who:20,window:21,without:[2,10,20],wizard:10,work:21,world:5,write:4,writer:[0,2,10,11,13],writer_table_set_styl:18,www:10,x:21,xl:2,xlsx:2,xml:20,xpathset:20,xr:21,you:[2,10,11,12,15,19,20,21,22],your:[10,11,12,21,22],yournam:10,zaz:[10,14,19,20],zazeasymacro_v0:20,zip:11,zip_cont:20},titles:["Welcome to ZAZ\u2019s documentation!","Apendixes","Application","Base","Calc","Data","Document","Cell and ranges","Manipulate ranges","Sheets","Configuration","Library easymacro.py","Email","Examples","For Application","For Base","For Calc","For Draw","For Writer","Introduction","Paths and files","Tools","Tools for debug","Writer"],titleterms:{"catch":22,"default":10,"export":2,"function":10,"new":[2,3,9],For:[14,15,16,17,18],If:2,Is:9,To:2,activ:9,all:[1,9],ani:20,apendix:1,applic:[2,14,20],author:10,autostyl:18,base:[3,15],binari:20,box:[21,22],calc:[1,4,16],call:[2,21,22],cell:[7,16],clipboard:17,close:2,code:9,color:[9,21],configur:[10,20,21],contain:[2,9],content:[0,11,13],copi:[2,8,9,20],count:[2,9],creat:[2,15],csv:20,current:[2,6,23],custom:14,data:[5,15,16,20],databas:3,date:21,debug:22,decrypt:21,delet:[8,14,20],dictionari:21,digest:21,dir:[2,20],directori:20,dispatch:2,doc:[2,6,23],document:[0,6,9,20],domain:10,draw:17,easymacro:11,email:12,encrypt:21,error:[21,22],exampl:13,except:22,execut:20,exist:20,extens:[10,19,20],extern:21,file:[10,20,22],file_nam:2,filter:[1,2],first:19,fonst:2,format:20,from:[9,17,20,21],get:[1,2,9,20,21],header:6,home:20,icon:10,id:[10,20],imag:17,index:9,indic:0,info:[7,20,21,22],info_debug:22,inform:10,inputbox:21,insert:[8,15],instal:[19,20],instanc:2,introduct:19,is_modifi:2,is_read_onli:2,is_sav:2,iter:2,join:20,json:[20,21],librari:11,libreoffic:20,licens:10,list:21,local:10,log:22,macro:21,main:10,make:[14,21],manipul:8,menu:[10,14],messag:[21,22],method:2,move:[8,9],mri:22,my:19,name:[2,9,10],obj:2,open:[2,20,21],overview:19,paramet:10,parent:[9,10],password:9,past:2,path:[2,10,20],pc:21,pdf:2,program:[10,21],properti:[2,21],protect:9,py:11,pygettext:10,python:20,question:21,rang:[7,8],read:[5,20],remov:9,render:21,replac:20,requir:19,s:0,save:[2,17,20,21],select:[2,6,8,15,20],send:12,set:[9,18],set_focu:2,sheet:[1,9],show:21,simpl:21,sort:9,special:7,status_bar:2,string:21,system:20,tab:[6,9],tabl:[0,15,18],temp:20,tempor:20,test:10,text:20,thread:21,time:21,timer:21,titl:2,tool:[21,22],tupl:[9,21],type:[2,10,20],uid:2,unzip:20,url:[20,21],verifi:20,version:10,visibl:[2,9],warn:21,welcom:0,write:5,writer:[18,23],zaz:0,zip:20,zoom:2}})
\ No newline at end of file
diff --git a/doc/source/main/calc.rst b/doc/source/main/calc.rst
index 8dfd34d..f26ad34 100644
--- a/doc/source/main/calc.rst
+++ b/doc/source/main/calc.rst
@@ -1,4 +1,3 @@
-
Calc
----
@@ -9,583 +8,11 @@ Remember, always import library.
import easymacro as app
-Document
-~~~~~~~~
-
-Current doc
-^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.type)
-
-
-Selection
-^^^^^^^^^
-
-* If selection is range get LOCalcRange, if selection is shape get LOShape, other selection get original pyuno object.
-
-.. code-block:: python
-
- doc = app.active
- selection = doc.selection
- app.msgbox(type(selection))
-
-
-Headers
-^^^^^^^
-
-* Hide or show columns and rows headers.
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.headers)
- doc.headers = not doc.headers
- app.msgbox(doc.headers)
- doc.headers = not doc.headers
-
-
-Tabs
-^^^^
-
-* Hide or show tab sheets.
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.tabs)
- doc.tabs = not doc.tabs
- app.msgbox(doc.tabs)
- doc.tabs = not doc.tabs
-
-
-Sheets
-~~~~~~
-
-Active sheet
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.name)
-
- # or
- doc = app.active
- sheet = doc.active
-
-
-Get by index
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc[0]
- app.msgbox(sheet.name)
-
-
-Get by name
-^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc['Sheet1']
- app.msgbox(sheet.name)
-
-
-Contains
-^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox('Sheet1' in doc)
-
-
-Get tuple with all names
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(doc.names)
-
-
-Count
-^^^^^
-
-.. code-block:: python
-
- doc = app.active
- app.msgbox(len(doc))
-
-New
-^^^
-
-* Always validate if new name not exists.
-
-.. code-block:: python
-
- doc = app.active
-
- sheet = doc.new_sheet()
- # CAUTION: If 'NewSheet' exists, reset it to clean sheet.
- doc['NewSheet'] = sheet
-
- # ~ or
-
- sheet = doc.insert('NewSheet2')
-
-* Insert multiple, get last insert.
-
-.. code-block:: python
-
- names = ('One', 'Two', 'Three')
- sheet = doc.insert(names)
-
-
-Move
-^^^^
-
-* Move by object to last position.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.move(sheet)
-
-* Move by name to last position.
-
-.. code-block:: python
-
- doc.move('Sheet1')
-
-* Move to position.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.move(sheet, 2)
-
-* Move from sheet
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.move()
-
-* Move to position.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.move(2)
-
-
-Remove
-^^^^^^
-
-* Remove by object.
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.remove(sheet)
-
-* Remove by name.
-
-.. code-block:: python
-
- doc.remove('One')
-
-* Remove from sheet.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.remove()
-
-
-Copy
-^^^^
-
-* Copy inside the same spreadsheet.
-
-* By object
-
-.. code-block:: python
-
- sheet = doc[0]
- doc.copy(sheet, 'OtherSheet')
-
-* By name
-
-.. code-block:: python
-
- doc.copy('Sheet1', 'Sheet2')
-
-* From sheet
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.copy(sheet.name + '_2')
-
-
-Copy from
-^^^^^^^^^
-
-* Copy sheet from one spreadsheet to other.
-
-.. code-block:: python
-
- doc = app.active
- doc_source = app.docs['Contacts.ods']
- name_source = 'Names'
- name_target = 'Names'
- position = 0
- doc.copy_from(doc_source, name_source, name_target, position)
-
-
-Copy to
-^^^^^^^
-
-* Copy from sheet with the same name
-
-.. code-block:: python
-
- doc = app.docs.new()
- sheet = app.active_sheet
- sheet.copy_to(doc)
-
-* Used new name
-
-.. code-block:: python
-
- doc = app.docs.new()
- sheet = app.active_sheet
- sheet.copy_to(doc, 'NewName')
-
-
-Sort
-^^^^
-
-* Sort sheets by names.
-
-.. code-block:: python
-
- doc = app.active
- doc.sort()
-
-Name
-^^^^
-
-* Name visible by the user.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.name)
- sheet.name = 'NewName'
- app.msgbox(sheet.name)
-
-
-Code name
-^^^^^^^^^
-
-* Name only accessible by code.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.code_name)
- sheet.code_name = 'my_name'
- app.msgbox(sheet.code_name)
-
-
-Visible
-^^^^^^^
-
-* Apply only with spreadsheet with two or more sheets.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.visible)
- sheet.visible = not sheet.visible
- app.msgbox(sheet.visible)
- sheet.visible = not sheet.visible
-
-
-Is protected
-^^^^^^^^^^^^
-
-* If sheet is protected with password.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.is_protected)
-
-
-Set password
-^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.password = 'letmein'
- app.msgbox(sheet.is_protected)
-
-
-Remove password
-^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- sheet.password = 'letmein'
- app.msgbox(sheet.is_protected)
-
- sheet.unprotect('letmein')
- app.msgbox(sheet.is_protected)
-
-
-Tab color
-^^^^^^^^^
-
-.. code-block:: python
-
- sheet = app.active_sheet
- app.msgbox(sheet.color)
-
- sheet.color = 'red'
- app.msgbox(sheet.color)
-
- # RGB
- sheet.color = (125, 200, 10)
- app.msgbox(sheet.color)
-
-
-Document parent
-^^^^^^^^^^^^^^^
-
-.. code-block:: python
-
- doc = sheet.doc
-
-
-Activate
-^^^^^^^^
-
-.. code-block:: python
-
- doc = app.active
- # Get last sheet
- sheet = doc[-1]
-
- # Activate from doc
- doc.activate(sheet)
-
- # Activate from sheet
- sheet.activate()
-
-
-Ranges
-~~~~~~
-
-Cells
-^^^^^
-
-* By name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- cell = sheet['A1']
- app.msgbox(cell.name)
-
-
-* By position [row, column]
-
-.. code-block:: python
-
- cell = sheet[1, 4]
- app.msgbox(cell.name)
-
-
-Ranges
-^^^^^^
-
-* By name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['B2:D5']
- app.msgbox(rango.name)
-
-* By position [start_row:end_row, start_column:end_column]
-
-.. code-block:: python
-
- rango = sheet[1:5,1:4]
- app.msgbox(rango.name)
-
-* Group ranges
-
-.. code-block:: python
-
- doc = app.active
- sheet = doc.active
- last = doc[-1]
- with doc.ranges as r:
- # Add one range
- r.add(sheet['A1:B2'])
- r2 = sheet['C4:D5']
- r3 = last['E7:D8']
- r4 = last['E10:F12']
- # Add multiple ranges
- r.add((r2, r3, r4))
- app.debug(r.names)
-
-* Get the same range in all sheets
-
-.. code-block:: python
-
- ranges = doc.get_ranges('A1:B1')
- app.debug(ranges.names)
-
-* Get columns by name.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['B:B']
- app.debug(rango.name)
-
- rango = sheet['D:F']
- app.debug(rango.name)
-
-* Get columns by position.
-
-.. code-block:: python
-
- sheet = app.active_sheet
- # Column B
- rango = sheet[0:,1]
- app.debug(rango.name)
-
- # Columnas D:F
- rango = sheet[0:,3:6]
- app.debug(rango.name)
-
-
-* Get rows
-
-.. code-block:: python
-
- sheet = app.active_sheet
- # One row
- row = sheet[1]
- app.debug(row.name)
-
- # Range rows
- row = sheet[3:10,0:]
- app.debug(row.name)
-
-
-Info ranges
-^^^^^^^^^^^
-
-* Get absolute name
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1:E10']
- app.msgbox(rango.name)
-
-* Get address
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1']
- a = rango.address
- data = f"""Cell Address
- Row: {a.Row}
- Column: {a.Column}
- """
- app.msgbox(data)
-
- rango = sheet['A1:E10']
- ra = rango.range_address
- data = (
- f'Range Address:\n\n'
- f'Star Row: {ra.StartRow}\n'
- f'End Row: {ra.EndRow}\n'
- f'Star Column: {ra.StartColumn}\n'
- f'End Column: {ra.EndColumn}\n'
- )
- app.msgbox(data)
-
-
-Special ranges
-^^^^^^^^^^^^^^
-
-* Get used area
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet.used_area
- app.msgbox(rango.name)
-
-* Get current region
-
-.. code-block:: python
-
- rango = sheet['A1'].current_region
- app.msgbox(rango.name)
-
-* Get next free cell
-
-.. code-block:: python
-
- cell = sheet['A1'].next_cell
- app.msgbox(cell.name)
-
-* Get merged area
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rango = sheet['A1'].merged_area
- app.msgbox(rango.name)
-
-* Get visible cells
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rangos = sheet['A1:E10'].visible
- for r in rangos:
- app.debug(r.name)
-
-* Get empty cells
-
-.. code-block:: python
-
- sheet = app.active_sheet
- rangos = sheet['A1:E10'].empty
- for r in rangos:
- app.debug(r.name)
-
-
-Manipulate ranges
-~~~~~~~~~~~~~~~~~
+.. toctree::
+ :maxdepth: 2
+
+ calc_doc.rst
+ calc_sheets.rst
+ calc_ranges.rst
+ calc_ranges2.rst
+ calc_data.rst
diff --git a/doc/source/main/calc_data.rst b/doc/source/main/calc_data.rst
new file mode 100644
index 0000000..5a2382b
--- /dev/null
+++ b/doc/source/main/calc_data.rst
@@ -0,0 +1,45 @@
+
+Data
+~~~~
+
+Read
+^^^^
+
+* Get value from cell, automatic detect type and get value.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A1']
+
+ value = cell.value
+ info = f'Cell Type = {cell.type}\n\nCell Value = {cell.value}'
+ app.msgbox(info)
+
+
+Write
+^^^^^
+
+* Automatic detect data type.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+
+ # ~ Set int
+ sheet['A1'].value = 1
+
+ # ~ Set float
+ sheet['A2'].value = 10.5
+
+ # ~ Set string
+ sheet['A3'].value = 'Damn World'
+
+ # ~ Set date
+ sheet['A4'].value = app.today()
+
+ # ~ Set time
+ sheet['A5'].value = app.now(True)
+
+ # ~ Set datetime
+ sheet['A6'].value = app.now()
diff --git a/doc/source/main/calc_doc.rst b/doc/source/main/calc_doc.rst
new file mode 100644
index 0000000..f3a5f26
--- /dev/null
+++ b/doc/source/main/calc_doc.rst
@@ -0,0 +1,50 @@
+Document
+~~~~~~~~
+
+Current doc
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.type)
+
+
+Selection
+^^^^^^^^^
+
+* If selection is range get LOCalcRange, if selection is shape get LOShape, other selection get original pyuno object.
+
+.. code-block:: python
+
+ doc = app.active
+ selection = doc.selection
+ app.msgbox(type(selection))
+
+
+Headers
+^^^^^^^
+
+* Hide or show columns and rows headers.
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.headers)
+ doc.headers = not doc.headers
+ app.msgbox(doc.headers)
+ doc.headers = not doc.headers
+
+
+Tabs
+^^^^
+
+* Hide or show tab sheets.
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.tabs)
+ doc.tabs = not doc.tabs
+ app.msgbox(doc.tabs)
+ doc.tabs = not doc.tabs
diff --git a/doc/source/main/calc_ranges.rst b/doc/source/main/calc_ranges.rst
new file mode 100644
index 0000000..84a34ed
--- /dev/null
+++ b/doc/source/main/calc_ranges.rst
@@ -0,0 +1,190 @@
+Cell and ranges
+~~~~~~~~~~~~~~~
+
+Cells
+^^^^^
+
+* By name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A1']
+ app.msgbox(cell.name)
+
+
+* By position [row, column]
+
+.. code-block:: python
+
+ cell = sheet[1, 4]
+ app.msgbox(cell.name)
+
+
+Ranges
+^^^^^^
+
+* By name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['B2:D5']
+ app.msgbox(rango.name)
+
+* By position [start_row:end_row, start_column:end_column]
+
+.. code-block:: python
+
+ rango = sheet[1:5,1:4]
+ app.msgbox(rango.name)
+
+* Group ranges
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc.active
+ last = doc[-1]
+ with doc.ranges as r:
+ # Add one range
+ r.add(sheet['A1:B2'])
+ r2 = sheet['C4:D5']
+ r3 = last['E7:D8']
+ r4 = last['E10:F12']
+ # Add multiple ranges
+ r.add((r2, r3, r4))
+ app.debug(r.names)
+
+* Get the same range in all sheets
+
+.. code-block:: python
+
+ ranges = doc.get_ranges('A1:B1')
+ app.debug(ranges.names)
+
+* Get columns by name.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['B:B']
+ app.debug(rango.name)
+
+ rango = sheet['D:F']
+ app.debug(rango.name)
+
+* Get columns by position.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ # Column B
+ rango = sheet[0:,1]
+ app.debug(rango.name)
+
+ # Columnas D:F
+ rango = sheet[0:,3:6]
+ app.debug(rango.name)
+
+
+* Get rows
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ # One row
+ row = sheet[1]
+ app.debug(row.name)
+
+ # Range rows
+ row = sheet[3:10,0:]
+ app.debug(row.name)
+
+
+Info ranges
+^^^^^^^^^^^
+
+* Get absolute name
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:E10']
+ app.msgbox(rango.name)
+
+* Get address
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1']
+ a = rango.address
+ data = f"""Cell Address
+ Row: {a.Row}
+ Column: {a.Column}
+ """
+ app.msgbox(data)
+
+ rango = sheet['A1:E10']
+ ra = rango.range_address
+ data = (
+ f'Range Address:\n\n'
+ f'Star Row: {ra.StartRow}\n'
+ f'End Row: {ra.EndRow}\n'
+ f'Star Column: {ra.StartColumn}\n'
+ f'End Column: {ra.EndColumn}\n'
+ )
+ app.msgbox(data)
+
+
+Special ranges
+^^^^^^^^^^^^^^
+
+* Get used area
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet.used_area
+ app.msgbox(rango.name)
+
+* Get current region
+
+.. code-block:: python
+
+ rango = sheet['A1'].current_region
+ app.msgbox(rango.name)
+
+* Get next free cell
+
+.. code-block:: python
+
+ cell = sheet['A1'].next_cell
+ app.msgbox(cell.name)
+
+* Get merged area
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1'].merged_area
+ app.msgbox(rango.name)
+
+* Get visible cells
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rangos = sheet['A1:E10'].visible
+ for r in rangos:
+ app.debug(r.name)
+
+* Get empty cells
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rangos = sheet['A1:E10'].empty
+ for r in rangos:
+ app.debug(r.name)
diff --git a/doc/source/main/calc_ranges2.rst b/doc/source/main/calc_ranges2.rst
new file mode 100644
index 0000000..d58ea7d
--- /dev/null
+++ b/doc/source/main/calc_ranges2.rst
@@ -0,0 +1,124 @@
+Manipulate ranges
+~~~~~~~~~~~~~~~~~
+
+**Not, not is necesary select range for manipulate**
+
+Select
+^^^^^^
+
+* Select from doc
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = app.active_sheet
+
+ cell = sheet['A1']
+ doc.select(cell)
+
+
+* Select in self range
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ rango.select()
+
+
+Move
+^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ rango.move(sheet['E6'])
+
+* Move to other sheet
+
+.. code-block:: python
+
+ rango.move(doc[-1]['E6'])
+
+
+Insert
+^^^^^^
+
+* Default insert down
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C1']
+ rango.insert()
+
+* Insert and move right
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.RIGHT)
+
+* Insert entire rows
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.ROWS)
+
+* Insert entire columns
+
+.. code-block:: python
+
+ rango.insert(app.CellInsertMode.COLUMNS)
+
+
+Delete
+^^^^^^
+
+* Default move up
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C1']
+ rango.delete()
+
+* Delete and move left
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.LEFT)
+
+* Delete entire rows
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.ROWS)
+
+* Delete entire columns
+
+.. code-block:: python
+
+ rango.delete(app.CellDeleteMode.COLUMNS)
+
+
+Copy
+^^^^
+
+* Using native method `copyRange`, current range always should be a cell and source should be a range.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ cell = sheet['A5']
+ source = sheet['D1:E4']
+ cell.copy_from(source)
+
+* From range to cell
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ rango = sheet['A1:C5']
+ target = sheet['E1']
+ rango.copy_to(target)
diff --git a/doc/source/main/calc_sheets.rst b/doc/source/main/calc_sheets.rst
new file mode 100644
index 0000000..542a954
--- /dev/null
+++ b/doc/source/main/calc_sheets.rst
@@ -0,0 +1,332 @@
+Sheets
+~~~~~~
+
+Active sheet
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.name)
+
+ # or
+ doc = app.active
+ sheet = doc.active
+
+
+Get by index
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc[0]
+ app.msgbox(sheet.name)
+
+
+Get by name
+^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ sheet = doc['Sheet1']
+ app.msgbox(sheet.name)
+
+
+Contains
+^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox('Sheet1' in doc)
+
+
+Get tuple with all names
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(doc.names)
+
+
+Count
+^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ app.msgbox(len(doc))
+
+New
+^^^
+
+* Always validate if new name not exists.
+
+.. code-block:: python
+
+ doc = app.active
+
+ sheet = doc.new_sheet()
+ # CAUTION: If 'NewSheet' exists, reset it to clean sheet.
+ doc['NewSheet'] = sheet
+
+ # ~ or
+
+ sheet = doc.insert('NewSheet2')
+
+* Insert multiple, get last insert.
+
+.. code-block:: python
+
+ names = ('One', 'Two', 'Three')
+ sheet = doc.insert(names)
+
+
+Move
+^^^^
+
+* Move by object to last position.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.move(sheet)
+
+* Move by name to last position.
+
+.. code-block:: python
+
+ doc.move('Sheet1')
+
+* Move to position.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.move(sheet, 2)
+
+* Move from sheet
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.move()
+
+* Move to position.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.move(2)
+
+
+Remove
+^^^^^^
+
+* Remove by object.
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.remove(sheet)
+
+* Remove by name.
+
+.. code-block:: python
+
+ doc.remove('One')
+
+* Remove from sheet.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.remove()
+
+
+Copy
+^^^^
+
+* Copy inside the same spreadsheet.
+
+* By object
+
+.. code-block:: python
+
+ sheet = doc[0]
+ doc.copy(sheet, 'OtherSheet')
+
+* By name
+
+.. code-block:: python
+
+ doc.copy('Sheet1', 'Sheet2')
+
+* From sheet
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.copy(sheet.name + '_2')
+
+
+Copy from
+^^^^^^^^^
+
+* Copy sheet from one spreadsheet to other.
+
+.. code-block:: python
+
+ doc = app.active
+ doc_source = app.docs['Contacts.ods']
+ name_source = 'Names'
+ name_target = 'Names'
+ position = 0
+ doc.copy_from(doc_source, name_source, name_target, position)
+
+
+Copy to
+^^^^^^^
+
+* Copy from sheet with the same name
+
+.. code-block:: python
+
+ doc = app.docs.new()
+ sheet = app.active_sheet
+ sheet.copy_to(doc)
+
+* Used new name
+
+.. code-block:: python
+
+ doc = app.docs.new()
+ sheet = app.active_sheet
+ sheet.copy_to(doc, 'NewName')
+
+
+Sort
+^^^^
+
+* Sort sheets by names.
+
+.. code-block:: python
+
+ doc = app.active
+ doc.sort()
+
+Name
+^^^^
+
+* Name visible by the user.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.name)
+ sheet.name = 'NewName'
+ app.msgbox(sheet.name)
+
+
+Code name
+^^^^^^^^^
+
+* Name only accessible by code.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.code_name)
+ sheet.code_name = 'my_name'
+ app.msgbox(sheet.code_name)
+
+
+Visible
+^^^^^^^
+
+* Apply only with spreadsheet with two or more sheets.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.visible)
+ sheet.visible = not sheet.visible
+ app.msgbox(sheet.visible)
+ sheet.visible = not sheet.visible
+
+
+Is protected
+^^^^^^^^^^^^
+
+* If sheet is protected with password.
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.is_protected)
+
+
+Set password
+^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.password = 'letmein'
+ app.msgbox(sheet.is_protected)
+
+
+Remove password
+^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ sheet.password = 'letmein'
+ app.msgbox(sheet.is_protected)
+
+ sheet.unprotect('letmein')
+ app.msgbox(sheet.is_protected)
+
+
+Tab color
+^^^^^^^^^
+
+.. code-block:: python
+
+ sheet = app.active_sheet
+ app.msgbox(sheet.color)
+
+ sheet.color = 'red'
+ app.msgbox(sheet.color)
+
+ # RGB
+ sheet.color = (125, 200, 10)
+ app.msgbox(sheet.color)
+
+
+Document parent
+^^^^^^^^^^^^^^^
+
+.. code-block:: python
+
+ doc = sheet.doc
+
+
+Activate
+^^^^^^^^
+
+.. code-block:: python
+
+ doc = app.active
+ # Get last sheet
+ sheet = doc[-1]
+
+ # Activate from doc
+ doc.activate(sheet)
+
+ # Activate from sheet
+ sheet.activate()
diff --git a/source/easymacro.py b/source/easymacro.py
index c93905d..c20a176 100644
--- a/source/easymacro.py
+++ b/source/easymacro.py
@@ -215,6 +215,16 @@ class DataPilotFieldOrientation():
DPFO = DataPilotFieldOrientation
+class CellInsertMode():
+ from com.sun.star.sheet.CellInsertMode import DOWN, RIGHT, ROWS, COLUMNS
+CIM = CellInsertMode
+
+
+class CellDeleteMode():
+ from com.sun.star.sheet.CellDeleteMode import UP, LEFT, ROWS, COLUMNS
+CDM = CellDeleteMode
+
+
OS = platform.system()
IS_WIN = OS == 'Windows'
IS_MAC = OS == 'Darwin'
@@ -1195,9 +1205,9 @@ class LODocument(object):
# ~ return self.obj.getCurrentSelection()
return
- def select(self, obj):
- self._cc.select(obj)
- return
+ # ~ def select(self, obj):
+ # ~ self._cc.select(obj)
+ # ~ return
def to_pdf(self, path: str='', options: dict={}):
"""
@@ -1502,6 +1512,10 @@ class LOCalc(LODocument):
sheet = self.active
return sheet.render(data, clean=clean)
+ def select(self, rango):
+ self._cc.select(rango.obj)
+ return
+
class LOChart(object):
@@ -2473,6 +2487,10 @@ class LOCalcRange(object):
def type(self):
return self.obj.Type
+ @property
+ def error(self):
+ return self.obj.getError()
+
@property
def value(self):
v = None
@@ -2486,10 +2504,8 @@ class LOCalcRange(object):
@value.setter
def value(self, data):
if isinstance(data, str):
- # ~ print(isinstance(data, str), data[0])
if data[0] in '=':
self.obj.setFormula(data)
- # ~ print('Set Formula')
else:
self.obj.setString(data)
elif isinstance(data, Decimal):
@@ -2668,7 +2684,7 @@ class LOCalcRange(object):
self.obj.Validation = current
def select(self):
- self.doc.select(self.obj)
+ self.doc._cc.select(self.obj)
return
def search(self, options, find_all=True):
@@ -2728,32 +2744,51 @@ class LOCalcRange(object):
cursor.collapseToSize(cols, rows)
return LOCalcRange(self.sheet[cursor.AbsoluteName].obj)
- def copy(self, source):
+ def move(self, target):
+ sheet = self.sheet.obj
+ sheet.moveRange(target.address, self.range_address)
+ return
+
+ def insert(self, insert_mode=CIM.DOWN):
+ sheet = self.sheet.obj
+ sheet.insertCells(self.range_address, insert_mode)
+ return
+
+ def delete(self, delete_mode=CDM.UP):
+ sheet = self.sheet.obj
+ sheet.removeRange(self.range_address, delete_mode)
+ return
+
+ def copy_from(self, source):
self.sheet.obj.copyRange(self.address, source.range_address)
return
- def copy_to(self, cell, formula=False):
- rango = cell.to_size(self.rows, self.columns)
- if formula:
- rango.formula = self.data
- else:
- rango.data = self.data
+ def copy_to(self, target):
+ self.sheet.obj.copyRange(target.address, self.range_address)
return
- def copy_from(self, rango, formula=False):
- data = rango
- if isinstance(rango, LOCalcRange):
- if formula:
- data = rango.formula
- else:
- data = rango.data
- rows = len(data)
- cols = len(data[0])
- if formula:
- self.to_size(rows, cols).formula = data
- else:
- self.to_size(rows, cols).data = data
- return
+ # ~ def copy_to(self, cell, formula=False):
+ # ~ rango = cell.to_size(self.rows, self.columns)
+ # ~ if formula:
+ # ~ rango.formula = self.formula
+ # ~ else:
+ # ~ rango.data = self.data
+ # ~ return
+
+ # ~ def copy_from(self, rango, formula=False):
+ # ~ data = rango
+ # ~ if isinstance(rango, LOCalcRange):
+ # ~ if formula:
+ # ~ data = rango.formula
+ # ~ else:
+ # ~ data = rango.data
+ # ~ rows = len(data)
+ # ~ cols = len(data[0])
+ # ~ if formula:
+ # ~ self.to_size(rows, cols).formula = data
+ # ~ else:
+ # ~ self.to_size(rows, cols).data = data
+ # ~ return
def optimal_width(self):
self.obj.Columns.OptimalWidth = True