QTP Date Table Objects

来源:互联网 发布:node.js restful 框架 编辑:程序博客网 时间:2024/05/21 21:38

 

Associated Methods:

AddSheet Method
 Variable=DataTable.AddSheet ("MySheet").AddParameter("Time", "8:00")

DeleteSheet Method
 DataTable.DeleteSheet "MySheet"

Export Method
 DataTable.Export ("C:/flights.xls")

ExportSheet Method
 DataTable.ExportSheet "C:/name.xls" ,1

GetCurrentRow Method
 row = DataTable.GetCurrentRow
 Reporter.ReportEvent 1, "Row Number", row

GetRowCount Method
 rowcount = DataTable.GetSheet("MySheet").GetRowCount
 Reporter.ReportEvent 2, "There are " &rowcount, "rows in the data sheet."

GetSheet Method
 MyParam=DataTable.GetSheet ("MySheet").AddParameter("Time", "8:00")
 DataTable.GetSheet ("MySheet").AddParameter "Time", "8:00"

GetSheetCount Method
 sheetcount = DataTable.GetSheetCount
 Reporter.ReportEvent 0, "Sheet number", "There are " & sheetcount & " sheets in the Data Table."

Import Method
 DataTable.Import ("C:/flights.xls")

ImportSheet Method
 DataTable.ImportSheet "C:/name.xls" ,1 ,"name"

SetCurrentRow Method
 DataTable.SetCurrentRow (2)

SetNextRow Method
 DataTable.SetNextRow

SetPrevRow Method
 DataTable.SetPrevRow


Associated Properties:

GlobalSheet Property
 ParamValue=DataTable.GlobalSheet.AddParameter("Time", "5:45")
 DataTable.GlobalSheet.AddParameter "Time", "5:45"

LocalSheet Property
 MyParam=DataTable.LocalSheet.AddParameter("Time", "5:45")

RawValue Property
 FormulaVal=DataTable.RawValue ("Date", "ActionA")

Value Property
 DataTable.Value ("Destination", "ActionA")="New York"
 DataTable.Value (2,3)="New York"
 DataTable("Destination", dtlocalSheet)="New York"

原创粉丝点击