- Primeros pasos
- Tutoriales
- Proyectos de automatización
- Crear automatizaciones
- Fundamentos de la automatización
- Repo. de objetos
- Mejores prácticas de automatización
- Tutorial: Crear una tabla dinámica
- Tutorial: Iterar a través de las filas de una tabla
- Tutorial: Comparar archivos de Excel y envío de errores de conciliación por correo electrónico
- Tutorial: Extraer datos de correos electrónicos automatizados y trasladarlos a una aplicación de escritorio
- Tutorial: Filtrar datos en Excel
- Tutorial: Formatear celdas
- Tutorial: Añadir información en los archivos de una carpeta a un archivo de Excel
- Tutorial: Añadir sus propias fórmulas al cuaderno del proyecto
- Automatización de PowerPoint
- Automatización de datos
- Actividades comunes
- Automatización de Google Workspace
- Automatización de OneDrive y SharePoint
- Solución de problemas

StudioX user guide
Tutorial: Añadir información en los archivos de una carpeta a un archivo de Excel
En este tutorial, crearemos una automatización que recupere el nombre y el tamaño de todos los archivos de una carpeta y lo agregue a un archivo de Excel.
We will create a project and start by adding a Use Excel File activity to indicate the Excel file to use. We will then add a For Each File In Folder activity to indicate the folder from which to retrieve file information. Inside For Each File in Folder, we will add two Write Cell activities, one to copy the name, the other to copy the size of each file to two cells in the Project Notebook. We will finish by adding an Append Range activity that appends the two cells to a range in an Excel file after the cells are populated for each file.
- Configurar un proyecto y crear un archivo de Excel en la carpeta del proyecto.
- Create a new blank project using the default settings.
- Crear un archivo de Excel en la carpeta del proyecto y nombrarlo archivos.xlsx.
- Abre el archivo recién creado en Excel y escribe el texto
File Nameen la celda A1 y el textoFile Sizeen la celda B1. - Guardar y cerrar archivos.xlsx.
- Agregar el archivo de Excel al proyecto e indicar la carpeta cuyos archivos se deben iterar.
-
En StudioX, en el panel de Actividades, selecciona la pestaña Excel y luego haz doble clic en Usar archivo Excel. Se añade al panel Diseñador una actividad Utilizar archivo de Excel.
-
En la actividad Usar archivo de Excel:
- Click Browse
next to the Excel file field, and then browse to and select the file files.xlsx. - En el campo Referencia como introduce
NamesSizes.
- Click Browse
-
En el panel de Actividades, selecciona la pestaña Archivo, y después arrastra la actividad Para cada archivo de la carpeta y suéltala dentro de la actividad Usar archivo de Excel.
-
In the For Each File in Folder activity, click Browse
next to the In folder field, and then browse to and select a folder on your computer which contains files, for example the Desktop.
-
- Copiar la información sobre los archivos en el archivo de Excel.
-
En el panel de Actividades, selecciona la pestaña Excel y luego arrastra una actividad Escribir celda y suéltala dentro para cada archivo de la carpeta.
-
En la actividad Escribir celda:
- Click Plus
on the right side of the What to write field, and then select CurrentFile > Name to indicate that we want to copy the name of the current file in the iteration. - Click Plus
on the right side of the Where to write field, and then select Notebook > Indicate in Excel to open the Project Notebook. In the file, select the A1 cell in the Scratchpad sheet, and click Confirm in the UiPath tab in the Excel ribbon. You have indicated that you want to paste the name of the current file in the iteration to cell A1 in the Scratchpad sheet of the Project Notebook.
- Click Plus
-
Agrega una segunda actividad Escribir celda debajo de la primera vez.
-
En la actividad Escribir celda:
- Click Plus
on the right side of the What to write field, and then select CurrentFile > Size to indicate that we want to copy the size (in bytes) of the current file in the iteration. - Click Plus
on the right side of the Where to write field, and then select Notebook > Indicate in Excel to open the Project Notebook. In the file, select the B1 cell in the Scratchpad sheet, and click Confirm in the UiPath tab in the Excel ribbon. You have indicated that you want to paste the size of the current file in the iteration to cell B1 in the Scratchpad sheet of the NamesSizes Excel file.
- Click Plus
-
Para hacer más fácilmente identificables las dos actividades de Write Celda, edita el nombre en la barra superior de cada una.
Write Cell SizePor ejemplo, utilizarWrite Cell Namepara la primera y la segunda actividad. -
En el panel de actividades, arrastra una actividad Anexar rango y suéltala dentro de Para cada archivo de la carpeta, en la segunda actividad Escribir celda.
-
En la actividad Anexar rango:
-
Click Plus
on the right side of the Append after range field and then select NamesSizes > Sheet1. -
Click Plus
on the right side of the Excel range to append field, and then select Notebook > Indicate in Excel to open the file in Excel. In the file, select the A1:B1 cells and click Confirm in the UiPath tab in the Excel ribbon. You have indicated that you want to add the information about the current file in the iteration to columns A and B in the NamesSizes file after the existing data in the file.
-
-
Haz clic en Guardar en la cinta de opciones de StudioX para guardar la automatización y, después, haz clic en Ejecutar la automatización.
The name and size of each file in the indicated folder are copied one by one to cells A1 and A2 in the Scratchpad sheet of the Project Notebook, and then appended to files.xlsx.Download example
-