I am trying to import three data sheets from one excel into QTP at
runtime. It imports one fine, but the rest are empty. Here is my code:
--------------------------------------------------------
''Load multiple datasheets from excel into QTP.
DataTable.AddSheet("Tabs")
DataTable.AddSheet("Navs")
DataTable.AddSheet("Portets")
DataTable.ImportSheet "\\<local shared drive>\CS_QA QTP Files\Portal
\common.xls", "Tabs", "Portlets_temp"
DataTable.ImportSheet "\\<local shared drive>\CS_QA QTP Files\Portal
\common.xls", "Navs", "Portlets_temp"
DataTable.ImportSheet "\\<local shared drive>\CS_QA QTP Files\Portal
\common.xls", "Portlets", "Portlets_temp"
''Function that loads the excel spread sheets that are used for data
input
status = data_Import ("\\<local shared drive>\CS_QA QTP Files\Portal
\common.xls", "Portlets", "Portlets_temp", Parameter("Data_Set"),
rowToUse)
If status = False Then
reporter.ReportEvent micFail,"Data Import","Value Not found in Spread
Sheet"
exitRun
End If
--------------------------------------------------------
The name of my QTP script is Portlets_temp
(That is also the name of Action 1.)
The function that is called above just grabs the first column value
from the "Portlets" datasheet.
When I run the script and have up the "Data Table" window to help me
debug my script, I only see data get populated into "Portlets_temp",
yet "Tabs", "Navs" and "Portlets" are empty. I want data to only
appear in "Tabs", "Navs" and "Portlets".
What am I doing wrong?
Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---