+++ 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) ```