首页->【软件工具包使用(SW/Software Tools Usage)】

6 1

Dim objectQty(39, 5), t As Integer 'for Qty
Dim objectPrc(39, 5) As Double 'for price

'the file path
fileCountPath = "C:\Users\shiotha\Desktop\Count_0930_mon.csv"
filePricePath = "C:\Users\shiotha\Desktop\Price_0930_mon.csv"

Open fileCountPath For Input As #1
Open filePricePath For Input As #2


Do While Not EOF(1)
'read the qty file
Line Input #1, tmpVar
spmatch = Split(tmpVar, ",")
arrLen = UBound(spmatch)
For i = 0 To arrLen
    objectQty(lineNo, i) = CInt(spmatch(i))
Next
'read the prc file
Line Input #2, tmpVar
spmatch = Split(tmpVar, ",")
arrLen = UBound(spmatch)
For i = 0 To arrLen
    objectPrc(lineNo, i) = CDbl(spmatch(i))
Next
lineNo = lineNo + 1
Loop
Close #1, #2

楼主可见

  1. shwnyoo 1#

    ***此内容已隐藏,只有楼主可见***