easymacro/doc/content/es/calc/sheets/_index.md

57 lines
624 B
Markdown
Raw Normal View History

2022-08-19 22:21:14 -05:00
+++
title = "Hojas"
weight = 1
+++
#### Trabajar con hojas
### Referencia por índice
```python
doc = app.active
hoja = doc[0]
app.debug(hoja.name)
```
### Referencia por nombre
```python
doc = app.active
hoja = doc['datos']
app.debug(hoja.name)
```
### in
Verificar por nombre si una hoja existe.
```python
doc = app.active
existe = 'Hoja2' in doc
app.debug(existe)
```
### len
Contar la cantidad de hojas en el documento.
```python
doc = app.active
contar = len(doc)
app.debug(contar)
```
### iter
Recorrer todas las hojas.
```python
doc = app.active
for hoja in doc:
app.debug(hoja)
```