ImportFromExcelFile method

Relevant for: API testing only

Description

Imports the selected Excel file to your test.

Back to top

Class

DataSource

Back to top

Syntax

GetDataSource("<data source name>").ImportFromExcelFile(@"<path to Excel file>", "<test data source name>", header row>);

Back to top

Parameters

Parameter Description
Name Name assigned to the data source.
Path to data source The Windows path to the file for the data source.
Data source name in the test

The name the test gives the data source after importing.

Header row

A boolean value if the data source has a header row.

Possible values are "true" or "false".

Back to top

Return Type

Adds an Excel data source to your test.

Back to top

Example

GetDataSource("ConcatenateStrings!Sheet1").ImportFromExcelFile(@"C:\Users\user\Documents\UFT One\API Test Resources\ConcatenateStrings.xlsx", "Sheet1", true);

Back to top