需要 VB 代码将运行时在 QTP 脚本中检索到的数据粘贴到 Excel 工作表的一列中。

发布于 2024-09-01 03:33:18 字数 78 浏览 4 评论 0原文

我正在运行一个 QTP 脚本,其中动态生成数据。我在运行时检索数据,然后需要将该数据粘贴到 Excel 工作表(在一列中)中。请建议如何编码。

I am running a QTP script where a data is produced dynamically. I am retrieving the data during runtime and then I need to paste that data in an Excel sheet (in a column). Please suggest how to code it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吃→可爱长大的 2024-09-08 03:33:21
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]
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

Second model

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]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文