Description
Gets the value of the range from the Excel file. The 'Save value to variable' activity appears automatically when choosing the 'Read Excel Range' activity. It automatically saves the value to a variable. However, the activity is not mandatory to use and can be removed from the workflow.
Studio Pro supports Microsoft Excel .xls and .xlsx file formats.
As of the 8.3 update, there are two ways of interacting with MS Excel - Microsoft Native and Generic. Navigate to the menu "Settings" → "Microsoft activities" to choose a method.
Microsoft Native uses standard Microsoft methods to interact with the Excel application. It requires Excel to be installed on your computer and extends the capabilities of interacting with all Excel functionalities.
Generic does not require Excel to be installed and may have some Excel functionalities limitations.
Parameters
-
Set a value: enables you to directly write the desired path. Clicking the 'Pick' button allows you to manually choose the path.
-
Save the previous step result: chooses the previous activity result as a path.
-
Calculate a value: enables you to use available properties and methods to form a path.
Allows you to specify a start row for reading.
-
Set a value: enables you to directly write the desired number of the start row.
-
Save the previous step result: chooses the previous activity result as a number of the start row.
-
Calculate a value: enables you to use available properties and methods to form a number of the start row.
Allows you to specify an end row for reading.
-
Set a value: enables you to directly write the desired number of the end row.
-
Save the previous step result: chooses the previous activity result as a number of the end row.
-
Calculate a value: enables you to use available properties and methods to form a number of the end row.
Allows you to specify a start column for reading.
-
Set a value: enables you to directly write the desired Excel column index of the start column.
-
Save the previous step result: chooses the previous activity result as Excel column index of the start column.
-
Calculate a value: enables you to use available properties and methods to form Excel column index of the start column.
Allows you to specify an end column for reading.
-
Set a value: enables you to directly write the desired Excel column index of the end column.
-
Save the previous step result: chooses the previous activity result as Excel column index of the end column.
-
Calculate a value: enables you to use available properties and methods to form Excel column index of the end column.
By default, the first sheet in an Excel file is used.
-
Set a value: enables you to directly specify the sheet name, for example,
Employees
. -
Save the previous step result: chooses the previous activity result as the sheet name.
-
Calculate a value: enables you to use available properties and methods to form the sheet name.
The default method is "Use table headers".
-
Use table headers: select this option if the header contains of words specified by the user.
-
Use column letters: select this option if the header contains of the standard 'Excel' column names: 'A', 'B', 'C' and so on.
Contains an annotation to the activity. The input text will be displayed above the activity name.
Result
The excel data is stored in the excel_range_content
variable by default. This variable is an array of "key-value" objects. Each object of the array represents one row of the table.
For example, if we read the range between the first three rows (1-3) and columns (A-C) we can get such a record:
[
{
"Column 1": "Value (1,1)",
"Column 2": "Value (1,2)",
"Column 3": "Value (1,3)"
},
{
"Column 1": "Value (2,1)",
"Column 2": "Value (2,2)",
"Column 3": "Value (2,3)"
}
]
This record present the following table:
Column 1 |
Column 2 |
Column 3 |
Value (1,1) |
Value (1,2) |
Value (1,3) |
Value (2,1) |
Value (2,2) |
Value (2,3) |