标题: 用qtp操作excel时,蜜汁报错 [打印本页] 作者: ydlizb 时间: 2017-7-4 16:50 标题: 用qtp操作excel时,蜜汁报错 代码如下
Set ExcelApp = createobject("Excel.Application")
Set ExcelWor=ExcelApp.Workbooks.Open("E:\QTP_SAVE\EOM\Eom.xls")
Set ExcelShe = ExcelWor.Worksheets("sheets").UsedRange
rowcount = ExcelShe.Rows.count
columncount = ExcelShe.Columns.count
For i=1 to rowcount
For j=1 to columncount
msgbox ExcelShe.cells(i,j)
Next
Next