ImportFromExcelFile method
Relevant for: API testing only
Description
Imports the selected Excel file to your test.
Class
DataSource
Syntax
GetDataSource("<data source name>").ImportFromExcelFile(@"<path to Excel file>", "<test data source name>", header row>);
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". |
Return Type
Adds an Excel data source to your test.
Example
GetDataSource("ConcatenateStrings!Sheet1").ImportFromExcelFile(@"C:\Users\user\Documents\UFT One\API Test Resources\ConcatenateStrings.xlsx", "Sheet1", true);