TA的每日心情 | 开心 2015-10-19 13:26 |
---|
签到天数: 2 天 连续签到: 2 天 [LV.1]测试小兵
|
求助:为何我最后msgbox显示的是Except的最后一条记录,而不是我要的第3条记录?
-----------------------------
Dim Sales,SalsePercent,Sum,errSum
Set Sales = CreateObject("Scripting.Dictionary")
Set SalsePercent = CreateObject("Scripting.Dictionary")
DataTable.AddSheet "Except"
DataTable.ImportSheet "C:\Documents and Settings\kavensyw\Desktop\数据导出\POSData.xls",1,"Except"
Sum=0
For i=1 to Datatable.GetSheet("Except").GetRowCount
Datatable.GetSheet("Except").SetCurrentRow i
Sales.add i,datatable.GetSheet("Except").GetParameter("销售额")
SalsePercent.add i,datatable.GetSheet("Except").GetParameter("销售额占比")
Sum=Sum+Sales.Item(i)
Next
msgbox sales.item(3)&"--"&SalsePercent.item(3) |
|