0
我正在运行一个QTP脚本,其中的数据是动态生成的。我在运行时检索数据,然后我需要将这些数据粘贴到Excel工作表(在一列中)。请建议如何编码。需要VB代码在Excel工作表的一列中粘贴QTP脚本中运行时检索的数据。
我正在运行一个QTP脚本,其中的数据是动态生成的。我在运行时检索数据,然后我需要将这些数据粘贴到Excel工作表(在一列中)。请建议如何编码。需要VB代码在Excel工作表的一列中粘贴QTP脚本中运行时检索的数据。
dim excls
set excls=Createobject("Excel.Application")
set Book=excls.workbooks.add
set sheet1=Book.activesheet
sheet1.cells(1,1)="******** ********"
sheet1.saveas "Path of file"
excls.quit
第二种模式
Datatable.addsheet "Sheet name"
datatable.importsheet"File name,source sheer","destination sheet"
'now all the data are stored in sheet name at run time
'any query pls mail to me : [email protected]