From cb34e7847b6f0277af59024b180b43dd2314cef2 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Sun, 21 Aug 2022 09:11:20 -0500 Subject: [PATCH] Refactory and documented Calc Ranges --- doc/public/404.html | 16 +- doc/public/categories/index.html | 52 +- doc/public/es/404.html | 16 +- doc/public/es/application/index.html | 332 ++- doc/public/es/application/menus/index.html | 332 ++- .../es/application/shortcuts/index.html | 332 ++- doc/public/es/calc/cells/index.html | 1769 +++++++++++++++ doc/public/es/calc/cells/index.xml | 10 + doc/public/es/calc/cells/methods/index.html | 1733 +++++++++++++++ doc/public/es/calc/cells/methods/index.xml | 10 + .../es/calc/cells/properties/index.html | 1940 +++++++++++++++++ doc/public/es/calc/cells/properties/index.xml | 10 + doc/public/es/calc/index.html | 332 ++- doc/public/es/calc/ranges/index.html | 1762 +++++++++++++++ doc/public/es/calc/ranges/index.xml | 10 + doc/public/es/calc/ranges/methods/index.html | 1747 +++++++++++++++ doc/public/es/calc/ranges/methods/index.xml | 10 + .../es/calc/ranges/properties/index.html | 1750 +++++++++++++++ .../es/calc/ranges/properties/index.xml | 10 + doc/public/es/calc/sheets/events/index.html | 334 ++- doc/public/es/calc/sheets/index.html | 332 ++- doc/public/es/calc/sheets/methods/index.html | 332 ++- .../es/calc/sheets/properties/index.html | 332 ++- doc/public/es/categories/index.html | 332 ++- doc/public/es/dialog/index.html | 334 ++- doc/public/es/documents/index.html | 332 ++- doc/public/es/documents/methods/index.html | 332 ++- doc/public/es/documents/properties/index.html | 332 ++- doc/public/es/index.html | 332 ++- doc/public/es/index.json | 42 + doc/public/es/installation/index.html | 332 ++- doc/public/es/sitemap.xml | 12 + doc/public/es/tags/index.html | 332 ++- doc/public/es/tools/dates_and_time/index.html | 332 ++- doc/public/es/tools/email/index.html | 332 ++- doc/public/es/tools/index.html | 332 ++- doc/public/es/tools/macros/index.html | 332 ++- doc/public/es/tools/messages/index.html | 332 ++- doc/public/es/tools/paths/index.html | 332 ++- doc/public/es/tools/threads/index.html | 332 ++- doc/public/es/tools/timer/index.html | 332 ++- doc/public/es/tools/url/index.html | 332 ++- doc/public/es/tools/utils/index.html | 332 ++- doc/public/es/tools_debug/index.html | 332 ++- doc/public/fr/404.html | 16 +- doc/public/fr/categories/index.html | 52 +- doc/public/fr/index.html | 52 +- doc/public/fr/tags/index.html | 52 +- doc/public/index.html | 52 +- doc/public/installation/index.html | 52 +- doc/public/pt/404.html | 16 +- doc/public/pt/categories/index.html | 52 +- doc/public/pt/index.html | 52 +- doc/public/pt/installation/index.html | 52 +- doc/public/pt/tags/index.html | 52 +- doc/public/tags/index.html | 52 +- doc/public/tools_debug/index.html | 52 +- 57 files changed, 19423 insertions(+), 1048 deletions(-) create mode 100644 doc/public/es/calc/cells/index.html create mode 100644 doc/public/es/calc/cells/index.xml create mode 100644 doc/public/es/calc/cells/methods/index.html create mode 100644 doc/public/es/calc/cells/methods/index.xml create mode 100644 doc/public/es/calc/cells/properties/index.html create mode 100644 doc/public/es/calc/cells/properties/index.xml create mode 100644 doc/public/es/calc/ranges/index.html create mode 100644 doc/public/es/calc/ranges/index.xml create mode 100644 doc/public/es/calc/ranges/methods/index.html create mode 100644 doc/public/es/calc/ranges/methods/index.xml create mode 100644 doc/public/es/calc/ranges/properties/index.html create mode 100644 doc/public/es/calc/ranges/properties/index.xml diff --git a/doc/public/404.html b/doc/public/404.html index 69d3091..ec988c9 100644 --- a/doc/public/404.html +++ b/doc/public/404.html @@ -9,15 +9,15 @@ 404 Page not found - - - - - - - + + + + + + + - + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +

+ + Celdas y rangos +

+ + + + + + +

Trabajar con celdas y rangos

+

selection

+

Referencia por selección actual.

+
seleccion = app.selection
+app.debug(seleccion)
+
20/08/2022 15:32:36 - DEBUG - Cell: $Sheet1.$A$2
+20/08/2022 15:32:39 - DEBUG - Range: $Sheet1.$C$8:$D$11
+

address

+

Referencia por dirección.

+
hoja = app.active_sheet
+celda = hoja['A1']
+rango = hoja['C10:D15']
+
+app.debug(celda)
+app.debug(rango)
+

position

+

Referencia por posición.

+

Para celdas: HOJA[fila,columna]

+

Para rangos: HOJA[fila_inicial:fila_final, columna_inicial:columna_final]

+
hoja = app.active_sheet
+
+# ~ Cell A10
+celda = hoja[9,0]
+
+# ~ Range A1:C10
+rango = hoja[0:10,0:3]
+

iter

+

Iterar cada celda de un rango.

+
hoja = app.active_sheet
+rango = hoja['B10:C15']
+
+for celda in rango:
+    app.debug(celda)
+

contains

+

Verificar si un rango esta dentro de otro.

+
hoja = app.active_sheet
+
+celda = hoja['C5']
+rango = hoja['A1:E10']
+
+resultado = celda in rango
+app.debug(resultado)
+
+celda = hoja['C50']
+resultado = celda in rango
+app.debug(resultado)
+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/cells/index.xml b/doc/public/es/calc/cells/index.xml new file mode 100644 index 0000000..6d83b43 --- /dev/null +++ b/doc/public/es/calc/cells/index.xml @@ -0,0 +1,10 @@ + + + + Celdas y rangos on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/cells/ + Recent content in Celdas y rangos on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/cells/methods/index.html b/doc/public/es/calc/cells/methods/index.html new file mode 100644 index 0000000..4ad7bca --- /dev/null +++ b/doc/public/es/calc/cells/methods/index.html @@ -0,0 +1,1733 @@ + + + + + + + + + + + + Métodos :: Documentación para EasyMacro + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +

+ + Métodos +

+ + + + + + +

clear

+

Limpia el rango. Por default solo borra datos. Mire API CellFlags para más información.

+
rango.clear()
+

Para borrar todo.

+
rango.clear(app.ALL)
+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/cells/methods/index.xml b/doc/public/es/calc/cells/methods/index.xml new file mode 100644 index 0000000..d64a5ac --- /dev/null +++ b/doc/public/es/calc/cells/methods/index.xml @@ -0,0 +1,10 @@ + + + + Métodos on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/cells/methods/ + Recent content in Métodos on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/cells/properties/index.html b/doc/public/es/calc/cells/properties/index.html new file mode 100644 index 0000000..f27417c --- /dev/null +++ b/doc/public/es/calc/cells/properties/index.html @@ -0,0 +1,1940 @@ + + + + + + + + + + + + Propiedades :: Documentación para EasyMacro + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + + + + +
+
+ +
+ +
+ +
+ +

+ + Propiedades +

+ + + + + + +

is_cell

+

Verdadero (True) si el rango es de una sola celda.

+
hoja = app.active_sheet
+
+celda = hoja['A1']
+app.debug(celda.is_cell)
+
+rango = hoja['A1:C5']
+app.debug(rango.is_cell)
+

name

+

Devuelve la dirección de la celda o rango como texto.

+
hoja = app.active_sheet
+
+celda = hoja['A1']
+app.debug(celda.name)
+
+rango = hoja['A1:C5']
+app.debug(rango.name)
+

address

+

Devuelve la dirección de la celda como una estructura: com.sun.star.table.CellAddress

+
hoja = app.active_sheet
+
+celda = hoja['A1']
+if celda.is_cell:
+    app.debug(celda.address)
+

range_address

+

Devuelve la dirección del rango como una estructura: com.sun.star.table.CellRangeAddress

+
hoja = app.active_sheet
+
+rango = hoja['A1:C5']
+if not rango.is_cell:
+    app.debug(rango.range_address)
+

filas y columnas

+

Devolver el tamaño del rango en filas y columnas.

+
hoja = app.active_sheet
+
+rango = hoja['A1:E100']
+filas = len(rango)
+columnas = rango.len_columns
+app.debug(filas, columnas)
+

sheet

+

Devuelve la hoja padre.

+
rango = hoja['A1:C5']
+
+hoja = rango.sheet
+app.debug(hoja)
+

doc

+

Devuelve el documento padre.

+
rango = hoja['A1:C5']
+
+doc = rango.doc
+app.debug(doc)
+

style

+

Devuelve o aplica el estilo de celda.

+
rango = hoja['A1:C5']
+rango.style = 'Good'
+

current_region

+

Devuelve la región actual.

+
celda = hoja['A1']
+rango = celda.current_region
+app.debug(rango)
+

range_data

+

Devuelve la región actual del rango excepto la primer fila.

+
celda = hoja['A1']
+rango = celda.range_data
+app.debug(rango)
+

back_color

+

Devuelve o aplica el color de fondo del rango.

+
rango = hoja['A1:E10']
+rango.back_color = 'red'
+

type

+

Devuelve el tipo de contenido de la celda: texto, número o formula.

+
celda = hoja['A1']
+app.debug(celda.type)
+

error

+

Si la celda tiene una formula con error, devuelve el número de error.

+
celda = hoja['A1']
+app.debug(celda.error)
+

string

+

Devuelve o establece el contenido de la celda como texto.

+
celda = hoja['A1']
+celda.string = 'Maldito Mundo'
+app.debug(celda.type, celda.string)
+
+celda = hoja['A2']
+celda.string = 12345
+app.debug(celda.type, celda.string)
+

float

+

Devuelve o establece el contenido de la celda como valor.

+
celda = hoja['A1']
+celda.float = 12345
+app.debug(celda.type, celda.float)
+

formula

+

Devuelve o establece la formula de la celda.

+
celda = hoja['A1']
+celda.formula = '=RAND()'
+app.debug(celda.type, celda.formula)
+

date

+

Devuelve o establece el contenido de la celda como fecha.

+
celda = hoja['A1']
+celda.date = app.dates.date(1974, 1, 15)
+app.debug(type(celda.date), celda.date)
+
20/08/2022 18:38:53 - DEBUG - <class 'datetime.date'>   1974-01-15
+

time

+

Devuelve o establece el contenido de la celda como tiempo.

+
celda = hoja['A1']
+celda.time = app.dates.time(10, 11, 12)
+app.debug(type(celda.time), celda.time)
+

datetime

+

Devuelve o establece el contenido de la celda como fecha y tiempo.

+
celda = hoja['A1']
+celda.datetime = app.dates.datetime(1974, 1, 15, 10, 11, 12)
+app.debug(type(celda.datetime), celda.datetime)
+

value

+

Devuelve o establece el valor de la celda, estableciendo el tipo de dato automáticamente.

+
hoja = app.active_sheet
+
+celda = hoja['A1']
+celda.value = 'Soy Texto'
+app.debug(celda.type, celda.value)
+
+celda = hoja['A2']
+celda.value = 12345
+app.debug(celda.type, celda.value)
+
+celda = hoja['A3']
+celda.value = '=RAND()'
+app.debug(celda.type, celda.value)
+
+celda = hoja['A4']
+celda.value = app.dates.date(1974, 1, 15)
+app.debug(celda.type, celda.value)
+

data_array

+

Devuelve o establece los datos de un rango. Es un alias de DataArray.

+
rango = app.selection
+datos = rango.data_array
+app.debug(datos)
+rango.data_array = datos
+
+

El tamaño de los datos, debe ser exactamente del tamaño del rango destino. De lo contrario obtendrá un error.

+
+ +

formula_array

+

Devuelve o establece los datos de un rango. Es un alias de FormulaArray.

+
rango = app.selection
+
+datos = rango.data_array
+app.debug(datos)
+datos = rango.formula_array
+app.debug(datos)
+rango.formula_array = datos
+
+

data_array devolverá los resultados de las celdas con formulas. formula_array devolverá las formulas en dichas celdas.

+
+ +

data

+

Alias de data_array al obtener los datos. Al establecer los datos, si es un rango se comporta como data_array, pero si es una celda, se autoajusta al tamaño de los datos.

+
hoja = app.active_sheet
+celda = hoja['A1']
+datos = (
+    (1, 'Uno'),
+    (2, 'Dos'),
+    (3, 'Tres'),
+)
+
+celda.data = datos
+app.debug(celda.current_region.data)
+
+

Siempre valide que haya suficientes celdas libres para los datos para evitar sobreescribirlos.

+
+ +

dict

+

Devuelve o establece los datos como diccionarios.

+
hoja = app.active_sheet
+celda = hoja['A1']
+
+datos = (
+    {'No': 1, 'Nombre': 'Ingrid'},
+    {'No': 2, 'Nombre': 'Sophia'},
+    {'No': 3, 'Nombre': 'Scarlette'},
+)
+
+celda.dict = datos
+app.debug(celda.current_region.dict)
+

next_free

+

Devuelve la siguiente celda libre después de la región actual.

+
hoja = app.active_sheet
+celda = hoja['A1']
+
+celda_libre = celda.next_free
+app.debug(celda_libre)
+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/cells/properties/index.xml b/doc/public/es/calc/cells/properties/index.xml new file mode 100644 index 0000000..1f89d74 --- /dev/null +++ b/doc/public/es/calc/cells/properties/index.xml @@ -0,0 +1,10 @@ + + + + Propiedades on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/cells/properties/ + Recent content in Propiedades on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/index.html b/doc/public/es/calc/index.html index a999a89..f190fb3 100644 --- a/doc/public/es/calc/index.html +++ b/doc/public/es/calc/index.html @@ -12,22 +12,22 @@ Calc :: Documentación para EasyMacro - - - - - - - - - - + + + + + + + + + + - + - + - + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +

+ + Conjuntos de Rangos +

+ + + + + + +

Trabajar con conjuntos de rangos

+

Selección

+

Obtener una referencia desde la selección actual. Deben de estar seleccionados más de un rango de celdas.

+
doc = app.active
+seleccion = doc.selection
+app.debug(seleccion)
+
20/08/2022 13:21:17 - DEBUG - Ranges: ('Sheet1.A5:C8', 'Sheet1.E11:F14')
+

len

+

Contar los rangos.

+
doc = app.active
+contar = len(doc.selection)
+app.debug(contar)
+

iter

+

Iterar entre los rangos.

+
doc = app.active
+for rango in doc.selection:
+    app.debug(rango)
+
20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$B$4:$D$7
+20/08/2022 13:27:03 - DEBUG - Range: $Sheet1.$G$10:$H$14
+

index

+

Referencia a un rango por índice.

+
doc = app.active
+rangos = doc.selection
+
+rango = rangos[1]
+app.debug(rango)
+

address

+

Referencia a un rango por su dirección.

+
rango = rangos['Hoja1.A1:B5']
+app.debug(rango)
+

contain

+

Verificar si un rango esta en la colección.

+
doc = app.active
+hoja = doc.active
+rangos = doc.selection
+
+resultado = hoja['D5:F10'] in rangos
+app.debug(resultado)
+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/ranges/index.xml b/doc/public/es/calc/ranges/index.xml new file mode 100644 index 0000000..a2974e5 --- /dev/null +++ b/doc/public/es/calc/ranges/index.xml @@ -0,0 +1,10 @@ + + + + Conjuntos de Rangos on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/ranges/ + Recent content in Conjuntos de Rangos on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/ranges/methods/index.html b/doc/public/es/calc/ranges/methods/index.html new file mode 100644 index 0000000..138826c --- /dev/null +++ b/doc/public/es/calc/ranges/methods/index.html @@ -0,0 +1,1747 @@ + + + + + + + + + + + + Métodos :: Documentación para EasyMacro + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +

+ + Métodos +

+ + + + + + +

ranges

+

Crear un nuevo contender de rangos vacío.

+
doc = app.active
+rangos = doc.ranges()
+app.debug(rangos)
+

add

+
doc = app.active
+hoja = doc.active
+
+rangos = doc.ranges()
+rangos.add(hoja['A1:B2'])
+rangos.add(hoja['D5:F10'])
+app.debug(rangos)
+

remove

+
rangos.remove(hoja['A1:B2'])
+

get_ranges

+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/ranges/methods/index.xml b/doc/public/es/calc/ranges/methods/index.xml new file mode 100644 index 0000000..110df53 --- /dev/null +++ b/doc/public/es/calc/ranges/methods/index.xml @@ -0,0 +1,10 @@ + + + + Métodos on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/ranges/methods/ + Recent content in Métodos on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/ranges/properties/index.html b/doc/public/es/calc/ranges/properties/index.html new file mode 100644 index 0000000..8e46098 --- /dev/null +++ b/doc/public/es/calc/ranges/properties/index.html @@ -0,0 +1,1750 @@ + + + + + + + + + + + + Propiedades :: Documentación para EasyMacro + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ +
+
+ + +
+
+ +
+ +
+ +
+ +

+ + Propiedades +

+ + + + + + +

names

+

Devolver las direcciones de los rangos.

+
doc = app.active
+rangos = doc.selection
+
+nombres = rangos.names
+app.debug(nombres)
+

data

+

Devolver y establecer datos.

+
doc = app.active
+rangos = doc.selection
+
+datos = rangos.data
+app.debug(datos)
+rangos.data = datos
+
+

Cada rango debe tener exactamente el mismo tamaño.

+
+ +

style

+

Establecer el estilo de todos los rangos.

+
doc = app.active
+rangos = doc.selection
+rangos.style = 'Good'
+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/doc/public/es/calc/ranges/properties/index.xml b/doc/public/es/calc/ranges/properties/index.xml new file mode 100644 index 0000000..e30f32e --- /dev/null +++ b/doc/public/es/calc/ranges/properties/index.xml @@ -0,0 +1,10 @@ + + + + Propiedades on Documentación para EasyMacro + https://doc.cuates.net/easymacro/es/calc/ranges/properties/ + Recent content in Propiedades on Documentación para EasyMacro + Hugo -- gohugo.io + en-us + + diff --git a/doc/public/es/calc/sheets/events/index.html b/doc/public/es/calc/sheets/events/index.html index c4f46f8..e225298 100644 --- a/doc/public/es/calc/sheets/events/index.html +++ b/doc/public/es/calc/sheets/events/index.html @@ -12,22 +12,22 @@ Eventos :: Documentación para EasyMacro - - - - - - - - - - + + + + + + + + + + - + - + - +