QTP Date Table Objects

本文介绍了一种数据表处理方法,包括添加、删除工作表,设置当前行,导出及导入数据等功能。同时还提供了获取行数、当前行及工作表数量等属性的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

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"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值