UiPath Documentation
studiox
2023.10
false

Guía del usuario de StudioX

Última actualización 30 de abr. de 2026

Tutorial: Copiar desde un archivo CSV a Excel y enviar el archivo por correo electrónico

En este tutorial, copiaremos los datos de un archivo CSV a un archivo Excel existente y luego adjuntaremos el archivo Excel a un correo electrónico y lo enviaremos desde Outlook.

Crearemos un proyecto y comenzaremos añadiendo una actividad Usar archivo de Excel para indicar el archivo de Excel donde queremos copiar los datos. Dentro de esta actividad, añadiremos una actividad Leer CSV para indicar el archivo CSV desde el que copiar y en qué parte del archivo de Excel copiar. A continuación, añadiremos una actividad Usar aplicación de Outlook de escritorio para indicar la cuenta de Outlook que se utilizará y dentro de ella añadiremos una actividad Enviar correo electrónico para enviar el correo electrónico.

  1. Configura el proyecto y obtén los archivos necesarios.
    1. Crea un nuevo proyecto en blanco utilizando la configuración predeterminada.
    2. Download and extract the archive with the automation project in this example using the button at the bottom of this page, then copy the files A.csv and B.xlsx to your project folder.
  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 Browse Imagen de documentos next to the Excel file field, and then browse to and select the file B.xlsx

      • En el campo Referencia como, introduce ExcelB.

        Indicaste que trabajarás en el archivo B.xlsx que se conoce en tu automatización como ExcelB.

  3. Añade una actividad para copiar los datos del archivo CSV al archivo de Excel.
    1. Click Add Activity Imagen de documentos inside the Use Excel File activity, and then find the Read CSV activity in the search box at the top of the screen and select it. The activity is added inside the Use Excel File activity.
    2. In the Read CSV activity:
      • Click Browse Imagen de documentos next to the Read from file field, and then browse to and select the file A.csv.

      • Click Plus docs image on the right side of the Output to field, and then select ExcelB > Indicate in Excel. The spreadsheet is opened in Excel. Because there is already data in the file and we want to keep it, select the first cell in the first empty row (cell A7), and then click Confirm. The field is updated with your selection [ExcelB] Sheet1!A7.

        Has indicado que quieres copiar los datos del archivo CSV A.csv al archivo ExcelB en la Hoja1 empezando por la celda A7.

  4. Añade la cuenta de Outlook al proyecto y envía el correo electrónico.
    1. En el panel de actividades, selecciona la pestaña Correo y arrastre la actividad Utilizar aplicación de Outlook de escritorio y suéltala debajo de la actividad Usar archivo de Excel. Se añade una actividad de Uso de la aplicación Outlook de escritorio al panel Diseñador.

    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. En el panel de actividades, arrastra la actividad Enviar correo electrónico y suéltala dentro de la actividad Utilizar aplicación de Outlook de escritorio.

    4. En la actividad Enviar mensaje:

      • Click Plus Imagen de documentos on the right side of the Account field, and then select Outlook.

      • Click Plus Imagen 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 Save as draft option selected, the automation does not send the email, it instead saves the email to the Outlook Drafts folder.

      • Click Plus Imagen de documentos on the right side of the Subject field, and then select Text. In the Text Builder window, enter a subject for the email, for example Updated Excel File.

      • Click Plus Imagen 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 See attachment.

      • For Attachments, select Files, then click Browse docs image next to the field, and then browse to and select the file B.xlsx.

    5. Haz clic en Guardar en la cinta de StudioX para guardar la automatización y, a continuación, haz clic en Ejecutar para ejecutar la automatización. Los datos de A.csv se copian en B.xlsx y luego se adjuntan a un mensaje de correo y se envían utilizando los detalles configurados en la actividad Enviar correo electrónico . Descargar ejemplo

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado