|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Type myData
iData1 As Long
iData2 As Long
iData3 As Long
End Type
Sub test()
Dim strFileName$, strPath$, ar(), r&, vTemp As myData
strPath = ThisWorkbook.Path & "\"
strFileName = strPath & "AAA.Dat"
Open strFileName For Binary As #1
ReDim ar(1 To 10 ^ 6, 1 To 6)
Do While Not EOF(1)
Get #1, , vTemp
r = r + 1
ar(r, 1) = vTemp.iData1
ar(r, 2) = vTemp.iData2
ar(r, 3) = vTemp.iData3
Loop
Close #1
[A1].Resize(r, 6) = ar
End Sub |
评分
-
1
查看全部评分
-
|