iRobo.Activity.Excel Read Range

Reads range of cells from Excel file.



     Note: 

         Before using Office Activities, check Office Automation prerequisites from Office Page.

                                                                                                       

Properties

Input

  • Cells - Specify cells to read.
  • FileName -   Excel File path. (Mandatory)
  • Worksheet -  Excel Sheet to read.


Misc

  • ClearFormats -  Cell format to be cleared or not. Its input is True/False arguments.
  • DisplayName - Activity header name.
  • ReadPassword - Read Password for file if needed.
  • UseHeaderRow -  Count header rows or not. Its input is True/False arguments.
  • Visible -  Visible or not. Its input is True/False arguments.
  • WritePassword - Set  password to file.


Output

  • DataTable - Set the output to DataTable object.
  • JSON - Set the output to JSON file.
  • LastUsedColumn - Get the output of the last used column out of the excel sheet.
  • LastUsedRow - Get the output of the last used row out of the excel sheet.

Steps of Using Excel Read Range Activity

  1. Open iRobo Studio, and then open a new Workflow.
  2. Drag Excel Read Range Activity to the Sequence.
  3. Click on button in Activity to select File path to read data from.
  4. File name and path are displayed in File Name field in Properties Panel.
  5. Click Save button from iRobo Studio Menu to save Workflow.
  6. Click Play button to start the automated Process.

Example on Using Excel Read Range Activity

Here you can see how the ReadRange Activity is used in the following example to get all  Rows from a Table in  Excel Sheet.


  1. Open iRobo Studio, and then open a new Workflow.
  2. Drag ReadRange Activity to the Sequence.
  3. Click on button in Activity to select Excel File path to read file from.
  4. Create DataView & DataTable Variables in  Variable Table as shown in the image below. 

  1. Add DataTable to Output Panel as shown in the image below.

  1. Drag InvokeVB Activity to the Sequence, and add the below Script:
    • Dim dv As DataView, s As String
    • dv = dt.DefaultView
    • dv.RowFilter = "LOB = 'lpspre'"


  1. Drag ForEach Activity to the Sequence.
  2. Set  TypeArgument in Property Panel to System.Data.DataRowView.
  3. Enter (from row in dv.Cast(of DataRowView)() select row).ToList() in Values in PropertyPanel as shown in the image below.

  1. Drag Sequence Activity to ForEachBody, then Drag WriteLine Activity to the Sequence
  2. Enter DataTable Variable in the Text Area of  WriteLine Activity as shown in the image below.

  1. Select WriteLine Activity, and then Press 'Ctrl + F9' to inspect debugging.

  1. Click Save button from iRobo Studio Menu to save Workflow.
  2. Click Play button to start the automated process.
  3. Go to the Inspector Panel of  WriteLine Activity to check the output as shown in the image below.

Created with the Personal Edition of HelpNDoc: Write eBooks for the Kindle