Import method

Relevant for: API testing only


Imports the specified Excel data source into your test.

Back to top



Back to top


ExcelFileImportInputArgs <name> = new ExcelFileImportInputArgs(@"<path to data source>", "<data source name in the test>", "header row");
GetDataSource("<data source name>").Import (name);

Note: You must cast the data source in the first line of the syntax in order to use the Import method. If you do not want to cast the data source, use the ImportfromExcelFile method instead.

Back to top


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

An Excel data source added to your test.

Back to top


ExcelFileImportInputArgs a = new ExcelFileImportInputArgs(@"C:\Users\user\Documents\UFT One\API Test Resources\ConcatenateStrings.xlsx", "Sheet1", true);

Back to top