How do you data drive an external spreadsheet?

Showing Answers 1 - 2 of 2 Answers

Anna

  • Sep 13th, 2005
 

Import from External Spreadsheet File by selecting Import then From File .  Which imports a tabbed text file or a single sheet from an existing Microsoft Excel file into the table.  The sheet you import replaces all data in the currently selected sheet of the table, and the first row in the Excel sheet replaces the column headers in the corresponding Data Table sheet.  It is therefore essential that the first row of your Microsoft Excel sheet exactly matches the parameter names in your test.

If  it is a Database instead of Spreadsheet by selecting Import then From Database. It imports data from the specified database to the current sheet

 

Sonika

  • Dec 20th, 2005
 

Hello,

Can anyone please let me know how exactly we record the script n use external datatable...i got from Anna's answer that we need to use import from file...but can anyone please let me know how to start and go about recording..and calling xls data table..

Thanks

Sonika

  Was this answer useful?  Yes

Mrinalini

  • Apr 10th, 2007
 

In the expert view user can utilize the functions available in QTP for both importing and exporting sheets

The function that is used to perform this operation in QTP is “DataTable.”, on typing this in the expert view the user gets all the related functions for working on external datasheet

Datatable.Import("C:sheetname.xls")
similarly we can do export as well.