UiPath Documentation
studiox
2020.10
false
Guía del usuario de StudioX
Importante :
La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Tutorial: Filtrar datos en Excel

En este tutorial, creamos una automatización para el siguiente proceso:

  1. Copia en una nueva hoja los datos en una hoja de cálculo con información del proveedor.
  2. En la actividad Enviar correo electrónico: Filtra los datos para que se muestren únicamente las filas con proveedores de los sectores de Servicios y TI que se hayan añadido en los últimos 10 años.
  3. Copia los datos filtrados en un archivo CSV.
  4. Envía el archivo CSV por correo electrónico.

Creamos un proyecto con las siguientes actividades:

  • Una actividad Usar archivo de Excel para indicar el archivo de Excel con la información del proveedor.
  • A Copy Range activity to copy the data to another sheet.
  • Dos actividades Filtrar para filtrar los datos según los criterios deseados: un filtro para la columna Industria , el otro para la columna Proveedor desde .
  • Una actividad Escribir CSV para copiar los datos filtrados en un archivo CSV.
  • Una actividad Usar aplicación Outlook de escritorio para indicar la cuenta de Outlook desde la que enviar el correo electrónico.
  • Una actividad Enviar correo para enviar el correo electrónico.
  1. Paso 1: establece 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. Copia el archivo Suppliers.xlsx en tu carpeta del proyecto.
  2. Paso 2: añade el archivo de Excel al proyecto.

    1. Click Add activity Imagen 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 BrowseImagen de documentos next to the Excel file field, and then browse to and select the file Suppliers.xlsx

      • En el campo Referencia como, introduce Suppliers.

        Indicaste que trabajarás en el archivo DoubleUI.xlsx Suppliers.xlsxque se conoce en tu automatización como SuppliersUID.

  3. Paso 3: filas los datos y copiarlos a un archivo CSV.

    1. Click Add activity Imagen de documentos inside the Use Excel File and then, in the search box at the top of the screen, locate and select Copy Range. A Copy Range activity is added to the Designer panel.

    2. En la actividad Copiar rango:

      • Click PlusImagen de documentos on the right side of the Source range field, and then select Suppliers > Data [Sheet].

      • Click Plus Imagen de documentos on the right side of the Destination range field, and then select Suppliers > Processed [Sheet].

        Indicaste que querías copiar los datos de la hoja de Datos del archivo de Proveedores y pegarlos en la hoja de Procesados del mismo archivo.

    3. 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.

      Los datos se copian de la hoja de Datos a la hoja procesada en el libro de trabajo del Proveedor.

    4. Click Add activity Imagen de documentos inside the Use Excel File just below the Copy Range activity, and then, in the search box at the top of the screen, locate and select Filter. A Filter activity is added to the Designer panel.

    5. En la actividad Filtro:

      • Click PlusImagen de documentos on the right side of the Source range field, and then select Suppliers > Processed [Sheet].
      • Click PlusImagen de documentos on the right side of the Column name field, and then select Range > Industry.
      • Haz clic en el botón Configurar filtro. En la ventana del Filtro, asegúrate de que se selecciona el filtro Básico, y a continuación:
        • Click PlusImagen de documentos on the right side of the Value field, and then select Text. In the Text Builder, enter Services, and then click Save.

        • ClickAdd to add a second value.

        • Hacer clic en Más Imagen de documentos a la derecha del segundo campo Valor y luego selecciona Texto. En el Generador de texto, introduce IT, luego haz clic en Guardar y luego en Aceptar para cerrar la ventana Filtro.

          Usted ha indicado que desea filtrar los datos en la hoja Procesado para mostrar sólo las filas con los valores Servicios o TI en la columna Industria.

    6. Click Add activity Imagen de documentos inside the Use Excel File just below the Filter activity, and then, in the search box at the top of the screen, locate and select Filter. A second Filter activity is added to the Designer panel.

    7. En la segunda actividad de Filtro:

      • Click PlusImagen de documentos on the right side of the Source range field, and then select Suppliers > Processed [Sheet].
      • Click PlusImagen de documentos on the right side of the Column name field, and then select Range > Supplier Since.
      • Haz clic en el botón Filtro. En la ventana de Filtro:
        • Select Advanced filter.

        • Del Operador del menú desplegable, selecciona > (es mayor que).

        • Hacer clic en Más Imagen de documentos a la derecha del campo Valor y luego selecciona Texto. En el Generador de texto, introduce una fecha de hace 10 años, por ejemplo 5/5/2009, luego haz clic en Guardar y luego en Aceptar para cerrar la ventana Filtro.

          Se ha indicado que se desea filtrar los datos en la hoja Procesado para mostrar únicamente las filas con fechas posteriores al 5/5/2009 en la columna Proveedor desde.

    8. Para que los filtros sean más fácilmente identificables, edite el nombre en la barra superior de cada uno. Por ejemplo, usa 1 Filter Industrypara el primero y 2 Filter Supplier Sincepara el segundo.

    9. Click Add activity Imagen de documentos just below the Use Excel File activity, and then, in the search box at the top of the screen, locate and select Write CSV. A Write CSV activity is added to the Designer panel. Alternatively, you can also add this activity inside the Use Excel File activity, just below the last Filter activity.

    10. En la actividad Escribir CSV:

      • Click PlusImagen de documentos on the right side of the Write to what file field, and then select Text. In the Text Builder, enter result-, and then from the PlusImagen de documentos menu on the right side of the Text Builder select Project Notebook (Notes) > Date [Sheet] > YYYYMMDD [Cell]. The text in the Text Builder is updated to result-Excel Date!YYYYMMDD. Enter the text .csv at the end and click Save. The final text should be result-Excel Date!YYYYMMDD.csv.

      • Click PlusImagen de documentos on the right side of the Write from field, and then select Suppliers > Processed [Sheet].

        Indicaste que quieres crear un archivo CSV en la carpeta del proyecto cuyo nombre contiene el resultado de texto y la fecha de hoy, y que quieres copiar los datos de la hoja allí procesada.

  4. Paso 4: se puede enviar el archivo CSV.

    Los datos de la hoja Procesado se filtró, en un archivo CSV que tiene la fecha de hoy en el nombre y luego se envía el archivo CSV.

    1. Click Add activity Imagen de documentos below the Use Excel File activity, and then find the Use Desktop Outlook App activity in the search box at the top of the screen and select it. A Use Desktop Outlook App activity is added to the Designer panel.

    2. En la actividad, la cuenta de correo electrónico predeterminada ya está seleccionada en el campo selecciona cuenta de correo electrónico.Si quieres utilizar una cuenta diferente, selecciónalo en el menú desplegable.

      En el campo Referencia como, deja el valor por defecto Outlookcomo nombre para referirse a la cuenta en la automatización.

    3. Click Add activity Imagen de documentos inside theUse Desktop Outlook App activity, and then, in the search box at the top of the screen, locate and select Send Email. A Send Email activity is added to the Designer panel.

    4. En la actividad Enviar mensaje:

      • Click PlusImagen de documentos on the right side of the From account field, and then select Outlook.

      • Click PlusImagen de documentos on the right side of the To field, and then select Text. In the Text Builder window, enter an email address where to send the email. For example, you can enter your own email address to send the email to yourself. If you leave the Is draft option selected, the automation does not send the email, it instead saves the email to the Outlook Drafts folder.

      • Click PlusImagen de documentos on the right side of the Subject field, and then select Text. In the Text Builder window, enter List of filtered suppliers for, and then, from the PlusImagen de documentos menu on the right side of the Text Builder, select Project Notebook (Notes) > Date [Sheet] > Today [Cell]. The final text should look like this: List of filtered suppliers for [Excel]Date!Today. Click Save to close the Text Builder.

      • Click PlusImagen de documentos on the right side of the Body field, and then select Text. In the Text Builder window, enter text for the body of the email, for example Please see attachment.

      • Para los archivos adjuntos, selecciona Archivos y luego haz clic en Más Imagen de documentos en el lado derecho del campo y luego selecciona Texto. En el Generador de texto, introduce el nombre del archivo de la misma manera que lo has introducido en la actividad Escribir CSV: result-Excel Date!YYYYMMDD.csv. Una forma de hacerlo es seleccionar todo el texto en el Generador de texto del campo Escribir en qué archivo en la actividad Escribir CSV, copiar el texto y luego pegarlo en el Generador de texto del campo Archivos adjuntos.

    5. 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.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado