RE: 自己整合的比较经典的qtp框架+excel报告(zip)
qtp framework zip format. 回复 27# xiaohuazhong5您好,我用你的代码跑了一下,出现错误,请问这个如何解决? 回复 27# xiaohuazhong5
这个问题解决了,我创建了几个文件夹以后就可以了。
但是心的问题又出现了,是不是我环境变量设置的有问题?应该如何设置? SET_SHEET = Environment("SET_SHEET")
TEST_SHEET = Environment("TEST_SHEET")
不明白Environment("SET_SHEET")和 Environment("TEST_SHEET")的值是什么?在QTP中查看也没查出来。 Private Sub Report_Click()
Dim input_report As String
Dim long_input As Long
Dim serrial_project As Integer: serrial_project = 0
If Date_Month.Text = "" Then
MsgBox "Please input Report Date !"
End
End If
input_report = Date_Month.Text
long_input = CLng(CDate(input_report)) 'change date to long
While (Sheets("Month").Cells(serrial_project + 5, 3).Value <> "")
Call each_project(serrial_project, long_input)
serrial_project = serrial_project + 1
Wend
End Sub
'
Private Function each_project(a, b)
Dim j, k As Integer:k = 0
Dim sourch_report As String
Dim p1, p2 As Integer
Dim q1, q2 As String
Dim long_source As Long
Dim sum_ports As Integer: sum_ports = 0
For j = 1 To Sheets.Count
If UCase(Sheets(j).Name) = UCase(Sheets("month").Cells(a + 5, 3).Value) Then
While (UCase(Sheets(j).Cells(4 + k, 13).Value) <> "")
If (UCase(Sheets(j).Cells(4 + k, 13).Value) = "YES") Then
sourch_report = Sheets(j).Cells(4 + k, 10).Value
p1 = InStr(sourch_report, "/")
p2 = InStrRev(sourch_report, "/")
q1 = Left(sourch_report, p1 - 1)
q2 = Right(sourch_report, Len(sourch_report) - p2)
long_source = CLng(CDate(q1 & "/" & q2))
If long_source = b Then
sum_ports = sum_ports + Val(Sheets(j).Cells(4 + k, 11).Value)
End If
End If
k = k + 1
Wend
Sheets("month").Cells(a + 5, 5).Value = sum_ports
sum_ports = 0: k = 0
Exit For
End If
Next j
End Function 楼主是“QTP轻量级自动化测试框架”的作者吗?目测该框架和那个几乎一样. 回复 29# nonesense
你把exel文件重新另存为97-2003版本的应该就可以了! 回复 29# nonesense
你把exel文件重新另存为97-2003版本的应该就可以了! 回复 1# auuppp
不错的~顶:lol 下来看看 table = pathFind(testDataFolderName,testCaseFileName,"xls")有这个用法么?到这通过不了呀! 谢谢楼主
页:
1
[2]