Excel Actions
DevAssure provides a powerful Excel Library that enables seamless interaction with Excel files during test automation. Whether you're working with structured test data, generating reports, or validating spreadsheet content, the Excel actions offer a no-code, flexible approach to reading and comparing data from .xlsx
files. Use them to extract rows, validate expected values, or run regression checks between different versions of Excel data.

Action | Description |
---|---|
Excel.Read first sheet rows as array | Reads all rows from the first sheet and returns them as an array of arrays. |
Excel.Read first sheet rows as object | Reads all rows from the first sheet and returns them as objects using headers as keys. |
Excel.Read rows as array | Reads rows from a specified sheet and returns them as an array of arrays. |
Excel.Read rows as object | Reads rows from a specific sheet and returns them as an array of objects using headers. |
Excel.Compare data of all sheets | Compares all sheets between two Excel files and returns whether they match. |
Excel.Compare data of first sheet | Compares only the first sheet between two Excel files. |
Excel.Compare data of given sheet | Compares a specified sheet in two Excel files. |
Excel.Read first sheet rows as array
Reads all rows from the first sheet and returns them as an array of arrays.
-
Usage: Use this when you want to access Excel data by position (e.g., row and column index).
rows = Excel.Read first sheet rows as array data.xlsx
-
Arguments:
filePath
: Path to the Excel file.
-
Returns:
- An array of arrays, where each sub-array represents a row.
Excel.Read first sheet rows as object
Reads the first sheet and returns rows as objects using header names as keys.
-
Usage: Best used when your Excel has headers and you want to access data using field names.
records = Excel.Read first sheet rows as object users.xlsx
-
Arguments:
filePath
: Path to the Excel file.
-
Returns:
- An array of objects, each representing a row with key-value pairs.
Excel.Read rows as array
Reads rows from a specified sheet and returns them as an array of arrays.
-
Usage: Useful when you need to process Excel sheets other than the first one.
rows = Excel.Read rows as array orders.xlsx, Sheet2
-
Arguments:
filePath
: Path to the Excel file.sheetName
: Name of the sheet to read.
-
Returns:
- An array of arrays representing the rows.
Excel.Read rows as object
Reads rows from a specified sheet and returns them as an array of objects.
-
Usage: Recommended when reading structured data with headers in a specific sheet.
items = Excel.Read rows as object inventory.xlsx Stock
-
Arguments:
filePath
: Path to the Excel file.sheetName
: Name of the sheet to read.
-
Returns:
- An array of objects, each representing a row with keys as column headers.
Excel.Compare data of all sheets
Compares data across all sheets in two Excel files.
-
Usage: Ideal for full regression validation between two Excel files.
Excel.Compare data of all sheets expected.xlsx, actual.xlsx
-
Arguments:
filePath1
: Path to the first Excel file.filePath2
: Path to the second Excel file.
Excel.Compare data of first sheet
Compares the first sheet of two Excel files.
-
Usage: Use this when only the first sheet is relevant to your comparison.
Excel.Compare data of first sheet baseline.xlsx current.xlsx
-
Arguments:
filePath1
: First Excel file path.filePath2
: Second Excel file path.
Excel.Compare data of given sheet
Compares a specific sheet between two Excel files.
-
Usage: Helps validate a named sheet when the file contains multiple.
Excel.Compare data of given sheet of testdata1.xlsx Input testdata2.xlsx Input
-
Arguments:
filePath1
: First Excel file path.filePath2
: Second Excel file path.sheetName
: The name of the sheet to compare.