UiPath Documentation
studiox
2024.10
true
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

StudioX user guide

Última actualización 30 de abr. de 2026

Tutorial: Extraer datos de una tabla de una página web y editarlos en Excel

En este tutorial, desarrollaremos una automatización que extraiga una tabla con los tipos de cambio actuales del euro frente a otras monedas del sitio web del Banco Central EuropeoGuardamos los datos históricos de los tipos de cambio en una hoja de cálculo de Excel y pretendemos añadir estos datos a diario. Debido a que el formato de los datos extraídos del sitio web es diferente al de nuestra hoja de cálculo de Excel, tenemos que editar también los datos extraídos en Excel para aplicarles el formato correcto.

We will create a project and start by adding a Use Excel File activity to indicate the Excel file to use. We will then click Data Extraction in the StudioX ribbon to start a wizard that will help us extract the data from the website. When we complete the wizard, two already configured activities will be added automatically to our project: a Use Application/Browser activity that indicates the web page and an Extract Table Data activity that extracts the data. We will then add a series of Excel activities to transpose the data, format the data as dates or numbers, and append the data to the worksheet with historical exchange rates.

  1. Configura el proyecto y obtén los archivos necesarios.
    1. Create a new blank project using the default settings.
    2. Descarga y extrae el archivo con el proyecto de automatización en este tutorial utilizando el botón en la parte inferior de esta página y copia el archivo currency data.xlsx en la carpeta del proyecto.
    3. This example uses Google Chrome, which requires the UiPath® extension for Chrome to be installed. To install it, go to Home (StudioX Backstage View) > Tools, and then, under UiPath Extensions, click Chrome.
  2. Añade el archivo de Excel al proyecto.
    1. Click Add ActivityImagen de documentos in the Designer panel, and then find the Use Excel File activity in the search box at the top of the screen and select it. A Use Excel File activity is added to the Designer panel.
    2. En la actividad:
      • Click Browse next to the Excel file field, and then browse to and select the file currency data.xlsx

      • En el campo Referencia como, introduce currency.

        Indicaste que trabajarás con el archivo moneda datos.xlsx que se conoce en tu automatización como moneda.

  3. Extrae los datos de la página web.
    1. En StudioX, haz clic en Extracción de la tabla en la cinta de opciones para abrir el Asistente de extracción.

    2. Click Select Data to Extract to indicate the table from which to extract the data.

    3. Empieza a mover el ratón y observa cómo StudioX resalta los elementos de la interfaz de usuario que detecta. Mueve el ratón a algún lugar de la tabla y haz clic, por ejemplo, puedes hacer clic en el encabezado de Moneda.

    4. StudioX detecta que has hecho clic dentro de una tabla y te pregunta si quieres extraer datos de la tabla. Haz clic en .

    5. You can view a preview of the extracted table data by clicking the Preview button.

    6. You can select Extract data from multiple pages if the data spans multiple pages. Since that is not the case, select No.

      El asistente ha finalizado. Tu proyecto se muestra en StudioX, en donde se añadieron las actividades Utilizar aplicación/navegador y Extraer datos de tabla.

    7. In the Extract Table Data activity, click PlusImagen de documentos on the right side of the Extract to field, and then select currency > Sheet1 [Sheet] to indicate that you want to copy the extracted data to Sheet1 of the currency Excel file.

  4. Transpón, formatea y copia los datos en la hoja Datos históricos.
    1. Click Add ActivityImagen de documentos below the Use Application/Browser activity, then find the Copy Range activity in the search box at the top of the screen and click it. The activity is added to the project.
    2. En la actividad Copiar rango:
      • Click Plus on the right side of the Source field, and then select currency > Indicate in Excel.

      • En el archivo de Excel, selecciona Hoja1, luego selecciona el rango A2:C33 (el rango con los datos extraídos de la página web no incluyendo la fila de encabezado, y luego haz clic en Confirmar en la pestaña UiPath en la cinta de Excel.

        Indicaste que quieres copiar el rango A2:C33 de la Hoja1 del archivo de monedas.

      • Click Plus on the right side of the Destination field, and then select currency > Indicate in Excel.

      • En el archivo de Excel, selecciona la Hoja2, luego la celda B1 y haz clic en Confirmar en la pestaña UiPath de la cinta de Excel.

        Indicaste que quieres pegar los datos en Hoja2 del archivo de moneda a partir de la celda B1.

      • Desde el menú desplegable Qué copiar, selecciona Todo.

      • Selecciona Transponer para indicar que quieres transponer los datos en el destino (columnas a filas y filas a columnas).

    3. Click Add ActivityImagen de documentos below the Copy Range activity, then find the Format Cells activity in the search box at the top of the screen and click it. The activity is added to the project.
    4. En la actividad Formato de celdas:
      • Click Plus on the right side of the Source field, and then select currency > Indicate in Excel.

      • En el archivo de Excel, selecciona la Hoja 2, luego selecciona la tercera fila completa que contiene los tipos de cambio y, a continuación, haz clic en Confirmar en la pestaña UiPath de la cinta de Excel.

      • Haz clic en Establecer formato. Selecciona la pestaña Tipo de datos y en el menú desplegable Categoría selecciona Número. En la casilla Decimales introduce 2, y selecciona Usar separador de 1000.

         Indicaste que quiere formatear los datos de la Hoja2, fila 3 como número con dos decimales y utilizar el separador de 1000.

    5. Agregar una segunda actividad de celdas de formato debajo de la anterior.
    6. En la segunda actividad de Formatear Celdas:
      • Click Plus on the right side of the Source field, and then select currency > Indicate in Excel.

      • En el archivo de Excel, selecciona Hoja2, luego selecciona la celda A3, y a continuación haz clic en Confirmar en la pestaña UiPath de la cinta de Excel.

      • Haz clic en Establecer formato. Selecciona la pestaña Tipo de datos y en el menú desplegable Categoría selecciona Fecha y en el menú desplegable Formato de fecha selecciona 14/3/2012.

        Indicaste que quieres formatear los datos de la hoja2, celda A3 como fecha con el formato d/mm/aaaa.Aquí está la celda donde añadiremos la fecha de hoy.

    7. Click Add ActivityImagen de documentos below the second Format Cells activity, then find the Write Cell activity in the search box at the top of the screen and click it. The activity is added to the project.
    8. En la actividad Escribir celda:
      • Click Plus on the right side of the What to write field, and then select Project Notebook (Notes) > Date [Sheet] > Today [Cell].

      • Click Plus on the right side of the Where to write field, and then select currency > Indicate in Excel.

      • En el archivo de Excel, selecciona Hoja2, luego selecciona la celda A3, y a continuación haz clic en Confirmar en la pestaña UiPath de la cinta de Excel.

        Indicaste que quiere copiar la fecha del Cuaderno del proyecto a la celda A3 en la Hoja2 del archivo de moneda.

    9. Click Add ActivityImagen de documentos below the Write Cell activity, then find the Append Range activity in the search box at the top of the screen and click it. The activity is added to the project.
    10. En la actividad Anexar rango:
      • Click Plusdocs image on the right side of the Excel range to append field, and then select currency > Indicate in Excel.
        • En el archivo de Excel, selecciona Hoja 2, luego selecciona toda la fila, y haz clic en Confirmar en la pestaña de UiPath en la cinta de Excel.

          Indicaste que quieres copiar los datos de la fila 3 de la Hoja 2 y añadirlos a la hoja de Datos Históricos del archivo de moneda después de los datos existentes en la hoja.

        • Click Plusdocs image on the right side of the Append after range field, and then select currency > Historical Data [Sheet]. * From the What to copy drop-down menu, select All. * Leave Transpose deselected, since we don't need to transpose the data.

    11. Click Save in the StudioX ribbon to save the automation, then click Run to execute the automation.The web page is opened, the exchange rates are copied to Excel where they are formatted and added to the Historical Data sheet. Download example

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado