Read Column
UiPath.MicrosoftOffice365.Activities.Excel.ReadColumn
Description
Uses the Microsoft Graph Get range API to retrieve cell values from a specified column (StartingCell) in a workbook (Workbook) worksheet (SheetName).
After retrieving the cell value, the activity returns the column value in an Object[] (Column).
Scopes
This activity requires the following scopes:
- Files.ReadWrite
OR
- Files.ReadWrite.All
OR
- Sites.ReadWrite.All
Project compatibility
Windows - Legacy | Windows
Configuration
Properties
Common
- DisplayName - The display name of the activity. This property supports
Stringvariables and string formatted values.
Input
- Sheet Name - The name of the sheet from which data is read. This property supports
Stringvariables and string formatted values. - Starting Cell - The address of the column's starting cell. All contiguous cells below this are returned. Enter the address of a single cell in A1-style notation. This property does not support a range of cells (e.g., "A1:A5"). This property supports
Stringvariables and string formatted values. - Workbook - The
DriveItemwhose data is read. This object can be retrieved using the Find Files And Folders activity. Use the output property variable from either the Find Files and Folders (First or Results) or Create Workbook (Workbook) activities. When using the Results output property from the Find Files and Folders activity, be sure to specify which item in the array that you want to use (e.g., myWorkbooks(0)).
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.
Options
- Value Type - The type of data that is read from the document. Use the drop-down list to select one of the three options:
- Values - Default. Retrieves the coded value (i.e., backend) of the cells in the row. This might differ from the format value shown in the Excel worksheet (e.g., if the cell displays 23.00 in the worksheet, the coded value returned is 23).
- Formulas - Retrieves the formula of the specified cell only (e.g., =SUM(A1,B1)). If you select Formulas and the specified cell doesn't contain a formula, the returned value defaults to Values.
- Text - Retrieves the Excel worksheet value of the cell (e.g., if the cell displays 23.00 in the worksheet, the text value returned is 23.00).
Output
- Column - The values of the column as an array of objects. This field supports only
Object[]variables. Required if you plan to use the output data in subsequent activities.
How it works
The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.
- Complete the steps.
- Add the Microsoft Office 365 Scope activity to your project.
- Add an activity or run an external process that outputs a
DriveItemobject (e.g., Find Files and Folders, Create Workbook, Copy Item). - Add the Read Column activity inside the Microsoft Office 365 Scope activity.
- Enter values for the Input properties.
- Create and enter a
Object[]variable for the Output property. - Run the activity.
- Your input property values are sent to the GetRange API.
- The API returns the
Object[]value to your output property variable.
