Get Row as JSON Activity
The Get Row as JSON activity retrieves a specific row from an open Excel file and converts its data into a JSON formatted string. This activity enables users to store the row's contents as a variable for further processing or integration within automation workflows.
| Field | Description | Requirement |
|---|---|---|
| Excel Name | The reference name of the Excel file which has already been opened or created. | Required |
| Sheet Name | The name of the sheet to work in Excel. If not specified, the first sheet is used by default. | Optional |
| Sheet Index | The index of the sheet to work in Excel. If not specified, the first sheet is used by default. | Optional |
| Row | The zero-based index of the row to retrieve. | Optional |
| Result Variable Name | The name of the variable to store the returned JSON string. | Required |
Action Types & Examples
JSON String Output
- Format:
string - Example Result:
{"Name": "John Doe", "Age": 30, "City": "New York"}
Implementation Examples
Field Setup - Excel Name: \${newExcel}`-Sheet Name: `Sheet1`-Sheet Index: `5`-Row: `0`-Result Variable Name: `getJSON``
Execution Parameters - Target Excel Reference: \${newExcel}`-Working Sheet: `Sheet1`-Row to Extract: `0`-Output Variable: `getJSON``
Technical Notes
The activity expects the specified Excel file to be open and accessible. If the designated sheet or row index does not exist, the activity will terminate with an error. The generated JSON string represents the row's cells as key-value pairs, where keys typically correspond to column headers or default column names (e.g., 'Column1', 'Column2') if headers are not present or configured. Ensure the output variable is of a compatible string type to store the JSON data.