UiPath Documentation
activities
latest
false
Importante :
A tradução automática foi aplicada parcialmente neste conteúdo. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.
UiPath logo, featuring letters U and I in white

Atividades de produtividade

Última atualização 6 de abr de 2026

Início rápido - Localizar, criar e adicionar

O objetivo deste guia é ajudar você a criar uma amostra de trabalho que usa diferentes atividades Microsoft 365, incluindo as atividades Find Files and Folders, Create Workbook, Add Sheet e Get Sheets .

Pré-requisitos

Antes de você começar:

  1. Conclua as etapas do Microsoft 365.
  2. Crie ou use uma pasta existente em seu OneDrive. Você usará essa pasta para armazenar a pasta de trabalho criada nas etapas abaixo.
    • Você pode criar uma nova pasta manualmente ou seguir o guia de início rápido Criar, Escrever, Ler .

Etapas

Crie seu projeto
  1. Adicione a atividade Microsoft Office 365 Scope ao seu projeto.
  2. Insira o IdDoAplicativo para seu aplicativo registrado (para obter mais informações, consulte o guia).
  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. Adicione a atividade Find Files and Folders após a atividade Microsoft Office 365 Scope .
  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. Adicione a atividade Create Workbook após a atividade Find Files and Folders .
  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. Adicione a atividade Add Sheet após a atividade Create Workbook .
  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 quando o robô termina o primeiro conjunto de atividades, adicione a atividade Message Box após a atividade Add Sheet .
  16. Enter a String message (e.g., "Created "+workbookName+" and added "+sheetName).
Teste seu projeto
  1. Teste se sua nova planilha foi adicionada à pasta de trabalho criada, adicione a atividade Get Sheets após a atividade Add Sheet .
  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. Verifique se sua planilha foi encontrada adicionando uma atividade Write Line após a atividade Get Sheets .
  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).

Quando você estiver pronto, tente os outros guias de Início rápido para se familiarizar mais com as diferentes atividades Microsoft 365.

Como funciona

Depois de concluir as etapas deste guia, você terá uma sequência de automação que faz o seguinte:

  1. Estabelece uma conexão com seu aplicativo Microsoft 365 registrado (Microsoft Office 365 Scope).
  2. Encontra uma pasta existente em seu OneDrive para armazenar uma nova pasta de trabalho (Find Files and Folders).
  3. Cria uma nova pasta de trabalho na pasta encontrada do OneDrive (Criar Pasta de Trabalho).
  4. Adiciona uma nova planilha à pasta de trabalho recém-criada (Add Sheet).
  5. Informa quando a atividade da pasta de trabalho e da planilha foi criada (Message Box).
  6. Testa que sua nova planilha foi adicionada (Get Sheets e Write Line).

docs image

  • Pré-requisitos
  • Etapas
  • Como funciona

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades