>>265 続き[clsCsv]
Private data As Variant
Private dCol As Dictionary

Public Function LoadCSV(fn As String) As clsCSV
Dim i As Long, j As Long, k As Long
'インポート
'※CSVの仕様が書いてないから、遅いけどコレで。
With Workbooks.Open(fn)
data = .Worksheets(1).UsedRange.Value
.Close False
End With
'列情報のキャッシュ
Set dCol = New Dictionary
For i = 1 To UBound(data, 2)
dCol.Add data(1, i), i
Next
Set LoadCSV = Me
End Function

Public Property Get Table(Row As Long, Col As String) As Variant
If dCol.Exists(Col) Then
Table = data(Row + 1, dCol(Col))
Else
Err.Raise 9999
End If
End Property

Public Property Get RowsCount() As Long
RowsCount = UBound(data, 1) - 1
End Property
行数制限が辛いわ