You are on page 1of 21

Day 3: Foundation training

Automation Anywhere –  Read from CSV File command

Foundation Training 

String command
File and Folder command
 Insert command
 Windows Actions
 Lab Exercises

Confidential © Copyright 2015 Avanade Inc. All Rights Reserved.


© 2015 Avanade Inc. All Rights Reserved.
CSV Command – Sub Commands

• You can use this command to automate the process of reading data from various files and file formats. You can do the
following:
– Read comma or tab-delimited data from a CSV file.
– Read multiple lines in CSV or text files

© 2015 Avanade Inc. All Rights Reserved. 2


CSV Command – Sub Commands

• CSV
– Use this option to read data using Comma or Tab
delimiters from a CSV file.
– Always store CSV file name in external source and use
variables to provide the file path. This makes your task
more flexible in case of any change in file path.
– Always do a validation of the type of data stored in the
file.

© 2015 Avanade Inc. All Rights Reserved. 3


CSV Command – Sub Commands

• Text
– Using this command, read data using Newline, Comma,
Tab or Other delimiters from a Text file.

© 2015 Avanade Inc. All Rights Reserved. 4


String Command

• Use this command to manipulate a text string or extract • Suppose we have following Text:
part of a string and store it in a variable. String operations – Rating is Good. Grade:C.#
are very useful when automating business processes. For
example, you might want to extract a portion of a text – Rating is Good. Grade:A.#
block from an email, a website, or an application window. – Rating is Good.Grade:F.#
• The String Operation command provides the following sub- – Rating is Bad.Grade:G.#
commands:
– Before/After
– Display Rating Message=Good/Bad
– Compare
– Display Grade. A,B using before and substring
– Find
– Display Complete Message without #.
– Join
– Just for Fun: Display rating in Reverse
– Length
– Display Length
– Lower Case
– Replace
– Reverse
– Split
– Sub-String
– Trim
– Upper Case

© 2015 Avanade Inc. All Rights Reserved. 5


String Command – Sub Commands

• Before/After Command
• Use this command to specify a range of text to extract,
using Before and After keywords.
• Example: In the text string, 'Name of Applicant James
Smith Applicant Location,' let's copy only 'James Smith'.
We specify Before = 'Applicant' with an Occurrence of 1.
We also specify After = 'Applicant' with an Occurrence of
1. This is the first occurrence after the Before keyword,
although it is the second occurrence from the beginning of
the string.

© 2015 Avanade Inc. All Rights Reserved. 6


String Command – Sub Commands

• Compare Command Find Command


• Use this command to compare strings by specifying the • Use this command to locate a sub-string that exists within
strings. You can refine your search by selecting the 'Match the source string by specifying the Start parameter.
Case' option. A value of True or False is returned. You can
assign the values that are returned to a variable.

© 2015 Avanade Inc. All Rights Reserved. 7


String Command – Sub Commands

Join Command • Length Command


• Use this command to join all separate elements of list • Use this command to obtain the length of a string by
variables by defining the source string and a delimiter. specifying the source string.

• Lower Case Command


• Use this command to convert a source string to lower case
.

© 2015 Avanade Inc. All Rights Reserved. 8


String Command – Sub Commands

• Replace Command • Reverse Command


• Use this command to replace a portion of a source string • Use this command to reverse a specified source string.
with a specified replacement string.

© 2015 Avanade Inc. All Rights Reserved. 9


String Command – Sub Commands

• Split Command • Sub String Command


• Use this command to split a source string. Specify a • Use this command to retrieve a sub-string. Specify the
'Delimiter' and optionally number of delimiters to be source string and parameters such as 'Start From' and
considered in 'Limit'. Refine the scope by selecting 'Match optionally 'Length'.
Case'. The resulting elements are stored in a list variable.

© 2015 Avanade Inc. All Rights Reserved. 10


File and Folders

• Use the File and Folder commands to automate common operations that involve manipulating files and folders.
• The File and Folder commands provide an easy way to automate creating, opening, copying, moving, renaming, deleting, and
organizing files and folders.
• The File and Folder commands also offer advanced operations for working with files and folders based on their size and date
created or modified.

© 2015 Avanade Inc. All Rights Reserved. 11


File and Folder Command – Sub Commands

• Open File Command • Open Folder Command


• Use this command to open an existing file. • Use this command to open an existing folder.

© 2015 Avanade Inc. All Rights Reserved. 12


File and Folder Command – Sub Commands

• Copy Files Command • Copy Folder Command


• Use this command to copy an existing file. • Use this command to copy an existing folder.

© 2015 Avanade Inc. All Rights Reserved. 13


File and Folder Command – Sub Commands

• Similar to Copy File command AA also provide other commands


• Rename Files Command
• Rename Folder Command
• Delete Files Command
• Delete Folder Command

© 2015 Avanade Inc. All Rights Reserved. 14


File and Folder Command – Sub Commands

• Create File Command • Create Folder Command


• Use this command to create a new file. • Use this command to create a new folder.

© 2015 Avanade Inc. All Rights Reserved. 15


File and Folder Command – Sub Commands

• Zip Files Command


• Use this command to compress a group of files into a ZIP file.

© 2015 Avanade Inc. All Rights Reserved. 16


Insert Comments

Box important sections with repeating slashes, asterisks or equal signs.

Make comments meaningful

© 2015 Avanade Inc. All Rights Reserved.


Windows Action

Use this command to automate a Windows-based action,


such as minimizing, maximizing, or closing an application
window.

© 2015 Avanade Inc. All Rights Reserved.


Case Study – BP Tracker

Transform patient Blood pressure data from one sheet to a report on another Excel sheet
• Read data from sheet “Blood Pressure Data”.
• Get the Date of Test.
• Get the Average for Systolic, Diastolic and Heart Rate.
• Set this data in the respective columns on ReportOfDay

© 2015 Avanade Inc. All Rights Reserved. 19


Case Study – Extract table from Yahoo

Extract table from Yahoo site and store it into a csv file
• Open Yahoo Site https://in.finance.yahoo.com/actives?e=bo
• Extract firsts page table data.
• Provide the CSV file to which you want to export the data.
• Transfer top 10 rows from CSV file to an excel file.

© 2015 Avanade Inc. All Rights Reserved. 20


Questions?

© 2015 Avanade Inc. All Rights Reserved. 21

You might also like