Description
Reads the content of the specified cell or range of cells and returns the value as an output.
Attributes
Output
DataTable - Stores the data from the range provided as a data table variable.
Input
Range - The cell range whose contents would be read.
Worksheet - The name of the sheet to be updated. By default, it is set to “Sheet1”.
Options
AddHeaders - Omits the first row from the range and considers them as column headers.
Common
ContinueOnError - The Boolean value to specify whether to continue executing the next activities even if there is an error thrown on this activity.
Misc
DisplayName - Renames the activity.
Example
For this example, this is what the sample Spreadsheet contains:
- Add an Excel Sequence activity inside the initial Sequence.
- In the File Path field, search for and select your Spreadsheet document by clicking the browse button.
- Create a System.Data.DataTable variable and name it dt.
- After the Excel Sequence activity, add a Read Range activity.
- In the DataTable field under Properties, add the dt variable.
- In the Read Range Worksheet field, write Employees (or the name of the sheet you would use).
- In the Read Range Range field, write A2:D2.
- Create a String variable and name it output.
- After the Read Range activity, add an Output Data Table activity.
- In the Output Data Table Text field under Properties, add the output variable.
- In the Output Data Table DataTable field, insert the dt variable.
- After the Output Data Table, add a Write Line activity.
- Lastly, in the Text field, add the output variable.
The use case should look as the following screenshot:
The output should look like this in the Output panel: