|
在qtp中脚本
executefile "d:\bb.vbs"
testpath="d:\q.xls"
p=1
For i=1 to 10
call excel_write( testpath,"sheet1","A",i,p)
p=p+1
Next
bb.vbs中的函数如下:
function excel_write(syspath,sheet,row,col,valuein)
set excelapp=createobject("excel.application")
set excelbook=excelapp.workbooks.open(syspath)
set excelsheet=excelbook.worksheets(sheet)
excelsheet.activate
excelapp.range(row&col).value=valuein
excelbook.saveas syspath
excelbook.close
set excelapp=nothing
set excelbook=nothing
set excelsheet=nothing
end function
在qtp中执行脚本时每次for循环都有提示信息如附件,问题是:如何不要提示信息,直接向excel中写内容
[ 本帖最后由 test321123 于 2009-12-2 23:39 编辑 ] |
|