- Notas de Versão
- Introdução
- Tutoriais
- Projetos de automação
- Criando automações
- Noções básicas de automação
- Repo. de Objetos
- Tutorial: Criando uma Tabela Pivot
- Tutorial: Iterando através das Linhas de uma Tabela
- Tutorial: Extrair dados de e-mails automatizados e movê-los para um aplicativo da área de trabalho.
- Tutorial: Filtrar dados no Excel
- Tutorial: Formatar células
- Tutorial: Adicionar informações sobre os arquivos de uma pasta para um arquivo do Excel
- Tutorial: Adicionando suas Próprias Fórmulas ao Project Notebook
- Automação do PowerPoint
- Automação de dados
- Atividades comuns
- Automação do Google Workspace
- Automação do OneDrive e do SharePoint
Neste tutorial, criaremos uma automação para o seguinte processo:
- Copiar os dados de uma planilha com informações do fornecedor para uma nova planilha.
- Filtrar os dados para mostrar apenas as linhas com fornecedores dos setores Serviços e TI que foram adicionados nos últimos 10 anos.
- Copiar os dados filtrados para um arquivo CSV.
- Enviar o arquivo CSV por e-mail.
Vamos criar um projeto com as seguintes atividades:
- Uma atividade Use Excel File para indicar o arquivo do Excel com informações do fornecedor.
- A Copy Range activity to copy the data to another sheet.
- Duas atividades Filter para filtrar os dados de acordo com os critérios desejados: um filtro para a coluna Setor e outro para a coluna Fornecedor desde .
- Uma atividade Write CSV para copiar os dados filtrados para um arquivo CSV.
- Uma atividade Use Desktop Outlook App para indicar a conta do Outlook da qual enviar o e-mail.
- Uma atividade Send Email para enviar o e-mail.
-
Etapa 1: Configure o projeto e obtenha os arquivos necessários.
- Create a new blank project using the default settings.
- Baixe e extraia o arquivo com o projeto de automação neste tutorial usando o botão na parte inferior desta página. Copie o arquivo Suppliers.xlsx para sua pasta do projeto.
-
Etapa 2: Adicione o arquivo do Excel ao projeto.
-
Click Add activity
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. -
Na atividade:
-
Click Browse
next to the Excel file field, and then browse to and select the file Suppliers.xlsx -
No campo Referenciar como, insira
Suppliers.Com isso você indica que irá trabalhar com o arquivo
Suppliers.xlsxque é conhecido em sua automação comoSuppliers.
-
-
-
Etapa 3: Filtrar os dados e copiá-los para um arquivo CSV.
-
Click Add activity
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. -
Na atividade Copy Range:
-
Click Plus
on the right side of the Source range field, and then select Suppliers > Data [Sheet]. -
Click Plus
on the right side of the Destination range field, and then select Suppliers > Processed [Sheet].Você indicou que deseja copiar os dados da planilha Data no arquivo Suppliers e colá-los na planilha Processed do mesmo arquivo.
-
-
Clique em Salvar na faixa de opções do StudioX para salvar a automação e, então, clique em Executar para executar a automação.
Os dados são copiados da planilha Data para a planilha Processed na pasta de trabalho Suppliers.
-
Click Add activity
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. -
Na atividade Filter:
- Click Plus
on the right side of the Source range field, and then select Suppliers > Processed [Sheet]. - Click Plus
on the right side of the Column name field, and then select Range > Industry. - Clique no botão Configurar filtro. Na janela Filter, certifique-se de que Filtro básico esteja selecionado e, então:
-
Click Plus
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.
-
Clique em Mais
no lado direito do segundo campo Valor e, em seguida, selecione Texto. No Construtor de Texto, insira ITe, em seguida, clique em Salvar e então clique em OK para fechar a janela Filtrar.Você indicou que deseja filtrar os dados na planilha Processed para exibir apenas as linhas com os valores Serviços ou TI na coluna Industry.
-
- Click Plus
-
Click Add activity
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. -
Na segunda atividade Filter:
- Click Plus
on the right side of the Source range field, and then select Suppliers > Processed [Sheet]. - Click Plus
on the right side of the Column name field, and then select Range > Supplier Since. - Clique no botão Filtrar. Na janela Filtrar:
-
Select Advanced filter.
-
No menu suspenso Operador, selecione > (é maior que).
-
Clique em Mais
no lado direito do campo Valor e, em seguida, selecione Texto. No Construtor de Texto, insira uma data de até 10 anos atrás, como por exemplo, 5/5/2009, em seguida clique em Salvar e, então, clique em OK para fechar a janela Filter.Você indicou que deseja filtrar os dados na planilha Processed para exibir apenas as linhas com datas após 5/5/2009 na coluna Supplier Since.
-
- Click Plus
-
Para tornar os filtros mais facilmente identificáveis, edite o nome na barra superior de cada um. Por exemplo, use
Filter Industrypara o primeiro eFilter Supplier Sincepara o segundo. -
Click Add activity
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. -
Na atividade Write CSV:
-
Click Plus
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 Plus
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.csvat the end and click Save. The final text should beresult-Excel Date!YYYYMMDD.csv. -
Click Plus
on the right side of the Write from field, and then select Suppliers > Processed [Sheet].Você indicou que deseja criar um arquivo CSV na pasta do projeto cujo nome contém o texto resultante e a data de hoje, e que deseja copiar nele os dados na planilha Processed.
-
-
-
Etapa 4: Enviar o arquivo CSV por e-mail.
Os dados na planilha Processed são filtrados e, então, copiados para um arquivo CSV com a data de hoje no nome; depois, o arquivo CSV é enviado por e-mail.
-
Click Add activity
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. -
Na atividade, a conta de e-mail padrão já está selecionada no campo Conta. Se você quiser usar uma conta diferente, selecione-a no menu suspenso.
Na campo Referenciar como, deixe o valor padrão
Outlookcomo o nome pelo qual se referir à conta na automação. -
Click Add activity
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. -
Na atividade Send Email:
-
Click Plus
on the right side of the From account field, and then select Outlook. -
Click Plus
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 Plus
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 Plus
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 Plus
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 Anexos, selecione Arquivos e clique em Mais
no lado direito do campo e, em seguida, selecione Texto. No Construtor de Texto, insira o nome do arquivo da mesma maneira que inseriu na atividade Write CSV: result-Excel Date!YYYYMMDD.csv. Uma maneira de fazer isso é selecionar todo o texto no Construtor de Texto do campo Escrever em qual arquivo na atividade Write CSV, copiar o texto e, em seguida, colá-lo no Construtor de Texto do campo Anexos.
-
-
Clique em Salvar na faixa de opções do StudioX para salvar a automação e, em seguida, clique em Executar para executar a automação.
-