Local Files Usage in Robots

You can use Robots to load many types of files including HTML, Excel, CSV, and regular text files. This enables robots to extract data from a variety of sources.

  • The following file types can be loaded natively by robots: HTML, XML, Excel, and JSON.
  • Other file types can be loaded but are converted to HTML before being handled by the robot: plain text, CSV and PDF.

There are two procedures to load file types. If the file is located on the Internet, it is loaded using the Load Page action, specifying the URL of the file or using the Click action, clicking a link to the file. This automatically loads the file up in the page view. If the file is located on your system, load the file in the following way to ensure that the file is also available upon uploading the robot to the Management Console to be scheduled or added to a Kapplet.

All file types, except PDF, are loaded in the following way:

  1. Add a binary type variable to the robot. (O)
  2. In the Add Variable form, add a binary type variable to the robot.
    Note Other variable types such as PDF and HTML can also be used, but are not as flexible as the binary type and may not permit user input.
  3. Enter a name.
  4. In the Type and Initial/Test values, select an option from the list.
  5. Select the Global and Use as Input options as required.
    Note The difference between checking and not checking Use as Input only matters if the robot is to be scheduled or used in a Kapplet in the Management Console. An input variable is definable by the user, and so the file will be interchangeable each time the robot is run. On the other hand, if the file should be the same each time the robot is run, there is no need to use an input variable.
  6. Click Load to load a test file.

    If you have not selected Use as Input, this test file is the final file.

    A variable with an attribute of the type binary is added to a robot. It is defined as an input variable to allow users to input other files in Kapplets and Schedules.

    An excel file is loaded into the attribute.

  7. Next, on the Action tab, select Create Page.
  8. In the Contents list, select the file.

    This is used to load the file into the Page View. Before the step works, it should be configured to load the correct type of file.

    To load the file content from the binary variable, a Create Page step is used. For the Contents field, the value selector is set to variable, and the binary type variable is chosen. Afterwards, the step is configured to load the correct type of content.

  9. Click Configure.
  10. On the Page Loading tab, Page Content Type, select Same for All Pages.

    Page Loading options

  11. In the Content Type field, select the type of content you loaded.

    The Create Page step loads the file into the Page View.

    Note To load PDF files, see Extract from PDF.

    To use an input file for a schedule, see Adding a Single Robot in the Management Console.