diff --git a/doc/build/.doctrees/environment.pickle b/doc/build/.doctrees/environment.pickle index 0c6ec27..43d2fb8 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 0711fa8..05f8d38 100644 Binary files a/doc/build/.doctrees/main/calc.doctree and b/doc/build/.doctrees/main/calc.doctree differ diff --git a/doc/build/_sources/main/calc.rst.txt b/doc/build/_sources/main/calc.rst.txt index 82b7e2b..8dfd34d 100644 --- a/doc/build/_sources/main/calc.rst.txt +++ b/doc/build/_sources/main/calc.rst.txt @@ -429,7 +429,7 @@ Ranges rango = sheet['B2:D5'] app.msgbox(rango.name) -* By position [start_row, end_row, start_column, end_column] +* By position [start_row:end_row, start_column:end_column] .. code-block:: python @@ -455,6 +455,137 @@ Ranges * 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 +~~~~~~~~~~~~~~~~~ diff --git a/doc/build/main/calc.html b/doc/build/main/calc.html index d3fae31..bd4d299 100644 --- a/doc/build/main/calc.html +++ b/doc/build/main/calc.html @@ -419,7 +419,7 @@
rango = sheet[1:5,1:4]
 app.msgbox(rango.name)
@@ -442,15 +442,140 @@
     app.debug(r.names)
 
-
  • Writer