ImportSheet Method
Description
Imports a sheet of a specified file to a specified sheet in the design-time or run-time data table. The data in the imported sheet replaces the data in the destination sheet (see SheetDest argument).
Notes:
The column headings in the sheet you import must match the data table parameter names in the action for which the sheet is being imported. Otherwise, your test or component may fail.
The sheet you import automatically takes the name of the sheet it replaces.
If you import an excel sheet containing combo box or list cells, conditional formatting, or other special cell formats, the formats are not imported and the cell is displayed in the data table with a fixed value.
For details on importing data sheets to components and Business Process Tests, see the topic on importing and exporting data sheets in the OpenText Functional Testing Help Center.
Syntax
DataTable.ImportSheet FileName, vtSrcSheet, vtDstSheet
Example
The following example uses the ImportSheet method to import the first sheet of the name.xls table to the name sheet in the test's design-time or run-time data table.
DataTable.ImportSheet "C:\name.xls" ,1 ,"name"