Set app = CreateObject("Excel.Application")
Set appBook = app.Workbooks.Open("H:\SKU.xls")
Set appSheet = appBook.Worksheets(4)
For i=3 To 102
For j=1 To 8
ExpectValue = appSheet.cells(i,j).value
ActualValue = TableObj.GetCellData(i-3,j-1)
If Trim(ActualValue)<>Trim(ExpectValue) Then
reporter.ReportEvent micFail,"SKU排名报告不正确","ExpectValue--"&ExpectValue&vbCrLf&"ActualValue--"&ActualValue
End If
Next
Next
Set app = CreateObject("Excel.Application")
Set appBook = app.Workbooks.Open("G:\sku.xls")
Set appSheet = appBook.Worksheets(1)
ExpectValue = appSheet.range("A2").value
msgbox ExpectValue '不输出小数点前的0
If expectvalue<1.0 and expectvalue>0.0 Then
msgbox "0"&ExpectValue '输出小数点前的0
End If
appBook.Close
Set appBook = Nothing
Set app = Nothing作者: 小甘 时间: 2010-9-6 09:40
Cstr("单元格的值")