QTP读取EXCEL文件QTP读取EXCEL文件?Function getcell(filepath,sheetname,rownum,colnum)Set excobj cre
QTP读取EXCEL文件
QTP读取EXCEL文件
?
Function getcell(filepath,sheetname,rownum,colnum)
Set excobj = createobject("Excel.Application")
Set excfile = excobj.workbooks.open(filepath)
Set excsheet = excfile.worksheets(sheetname)
getcell = excsheet.cells(rownum,colnum)
msgbox getcell
End Function
getcell "d:\1.xls","Sheet2",2,"A"
