Excel Plugin

The plugin provides the ability to work with Excel documents.

Installation

Example 1. build.gradle
implementation(group: 'org.vividus', name: 'vividus-plugin-excel', version: '0.4.0-SNAPSHOT')

Table Transformers

FROM_EXCEL

FROM_EXCEL transformer generates table from the given Excel file.

Parameter Default Description

column

the resulting column name in the generated table. If it’s missing in properties then the first row is used for the column headings.

path

the relative path to the Excel file

sheet

the sheet name from the excel file

range

the range of cells from the specified excel sheet

addresses

the comma-separated collection of the cell addresses from the specified excel sheet

increment

1

the increment used to traverse the specified range

joinValues

false

defines whether cell values should be joined

lineBreakReplacement

empty string

value to substitute line breaks in cell values

range and addresses are competing parameters and only one can be specified in the transformer declaration at the same time.
Example 2. Usage example
Examples:
{transformer=FROM_EXCEL, path=/my-excel-file.xlsx, sheet=Data, range=A2:A7, lineBreakReplacement= , increment=2, column=test}
Example 3. Usage example
Examples:
{transformer=FROM_EXCEL, path=/my-excel-file.xlsx, sheet=Data, addresses=A2;B4;A7, column=test, joinValues=true}
Example 4. Usage FROM_EXCEL transformer with full-table range
Examples:
{transformer=FROM_EXCEL, path=/my-excel-file.xlsx, sheet=Data, range=A2:B4}

Steps

Create excel file with specified content

Create temporary excel file with specified content and save the path to the variable

When I create temporary excel file with content:$content and put path to $scopes variable `$variableName`
Example 5. Create temporary excel file
When I create temporary excel file with content:
|key1  |key2  |
|value1|value2|
and put path to scenario variable `path`