UiPath Documentation
activities
latest
false
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.
UiPath logo, featuring letters U and I in white

Actividades de productividad

Última actualización 27 de abr. de 2026

Inicio rápido: buscar, crear y añadir

El propósito de esta guía es ayudarte a crear una muestra funcional que utilice diferentes actividades de Microsoft 365, incluidas las actividades Buscar archivos y carpetas, Crear libro, Añadir hoja y Obtener hojas .

Requisitos previos

Antes de comenzar:

  1. Completa los pasos de Microsoft 365.
  2. Crea o usa una carpeta existente en tu OneDrive. Usarás esta carpeta para almacenar el libro que creas en los siguientes pasos.
    • Puedes crear una nueva carpeta manualmente o seguir la guía de inicio rápido Crear, Escribir, Leer .

Pasos

Construya su proyecto
  1. Añade la actividad Ámbito de Microsoft Office 365 a tu proyecto.
  2. Introduce el ApplicationId para tu aplicación registrada (para obtener más información, consulta la guía).
  3. From the AuthenticationType drop-down list, select the applicable type (e.g., InteractiveToken).
    • If you select InteractiveToken and run the sequence while you're present, you don't need to add a Password, Tenant, or Username in the Unattended section (leave empty).
  4. From the Services drop-down list, select, at a minimum,Files.
  5. Añade la actividad Buscar archivos y carpetas después de la actividad Ámbito de Microsoft Office 365 .
  6. Enter a Query (e.g., the folder name) to find the folder that you created, or are using, from step 2 in the prerequisites above (e.g., "Quickstarts").
  7. Create and enter a DriveItem variable for your First value (e.g., firstResult).
    • When creating your variable, select Microsoft.Graph.DriveItem as the variable type.
    • When your Query is specific, with no chance of finding more than one result, you can use the First output property only. When your Query is less specific you can add a DriveItem[] variable for your Results value to return all folders that meet the query parameters.
  8. Añade la actividad Crear libro después de la actividad Buscar archivos y carpetas .
  9. Create and enter a String variable for your Name value (e.g., workbookName).
  10. In the Parent property, enter the DriveItem variable you created for the Find Files and Folders activity (e.g. firstResult)
  11. Create and enter a DriveItem variable for your Workbook value (e.g., newWorkbook).
  12. Añade la actividad Añadir hoja después de la actividad Crear libro .
  13. Create and enter a String variable for your Sheet value (e.g. sheetName_).
  14. In the Workbook property, enter the DriveItem variable you created for the Create Workbook activity (e.g. newWorkbook).
  15. Para indicar cuándo el robot finaliza el primer conjunto de actividades, añade la actividad Cuadro de mensaje después de la actividad Añadir hoja .
  16. Enter a String message (e.g., "Created "+workbookName+" and added "+sheetName).
Pruebe su proyecto
  1. Pruebe que su nueva hoja se agregó al libro creado, agregue la actividad Obtener hojas después de la actividad Agregar hoja .
  2. In the Workbook property, enter the DriveItem variable you created for the Create Workbook activity (e.g. newWorkbook).
  3. Create and enter a String[] variable for your Sheets value (e.g., workbookSheets).
  4. Comprueba que se ha encontrado tu hoja añadiendo una actividad Escribir línea después de la actividad Obtener hojas .
  5. In Text property, enter a message that includes the String[] variable you created for the Sheets property (e.g., "Verified "+workbookSheets(1)+" was added!").
    • Because the variable is an array, you must specify the item you want to output by appending an integer value at the end (e.g., (1)).
    • In this example, you want to return the 2nd sheet from the workbook because the Add Sheet activity adds the new sheet at the end of existing sheets - when the new workbook the first sheet (i.e., "Sheet 1") was added by default.
  6. Click Run and verify that the Write Line activity includes the correct values to the Output panel (e.g., AddSheetExample).

Cuando estés listo, prueba las otras guías de inicio rápido para familiarizarte con las diferentes actividades de Microsoft 365.

Cómo funciona

Después de completar los pasos de esta guía, tendrá una secuencia de automatización que hará lo siguiente:

  1. Establece una conexión a tu aplicación registrada de Microsoft 365 (Ámbito de Microsoft Office 365).
  2. Busca una carpeta existente en tu OneDrive para almacenar un nuevo libro (Buscar archivos y carpetas).
  3. Crea un nuevo libro en la carpeta de OneDrive encontrada (Crear libro).
  4. Añade una nueva hoja al libro recién creado (Añadir hoja).
  5. Le indica cuándo se han creado el libro y la hoja de trabajo (Cuadro de mensaje).
  6. Comprueba que se ha añadido tu nueva hoja (Obtener hojas y Escribir línea).

Imagen de documentos

  • Requisitos previos
  • Pasos
  • Cómo funciona

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado