|
我写了一个脚本,不知道能不能满足你的需求。你可以试试~~
‘*******************************************************
IntRowCount=DataTable.GetSheet("Action1").GetRowCount
Randomize (Now)
IntRndNum=Int((IntRowCount - 1 + 1) * Rnd + 1)
IntCurrentRow=DataTable.GetSheet("Action1").GetCurrentRow
If IntRndNum<>IntCurrentRow Then
If IntRndNum>IntCurrentRow Then
For i=IntCurrentRow to IntRndNum-1
DataTable.GetSheet("Action1").SetNextRow
Next
GetRowValue=DataTable.Value("A","Action1")
Else
For i=IntRndNum to IntCurrentRow-1
DataTable.GetSheet("Action1").SetPrevRow
Next
GetRowValue=DataTable.Value("A","Action1")
End If
Else
GetRowValue=DataTable.Value("A","Action1")
End If
’******************************************************** |
|