polarisking
Member
Here's what I want to do
1. Import a large (220MB) pipe-delimited txt file very quickly (this works). Let's say the file has 280,000 rows. At this point I'll have a 1 dimensional array (strData) with 280,000 rows.
2. Now, I want to split each row using the "|" character into another array splitArr that's defined as splitArr(ubound(strData,188)
How Do I Do This?
Thank you in advance
1. Import a large (220MB) pipe-delimited txt file very quickly (this works). Let's say the file has 280,000 rows. At this point I'll have a 1 dimensional array (strData) with 280,000 rows.
2. Now, I want to split each row using the "|" character into another array splitArr that's defined as splitArr(ubound(strData,188)
How Do I Do This?
Thank you in advance
Code:
Sub Sample()
Dim MyData As String
Dim strData() As String
Dim splitArr As Variant
Dim ctr As Long
Dim arrRows As Long
Dim arrCols As Long
Open "FileLocation" For Binary As #1
MyData = Space$(LOF(1))
Get #1, , MyData
Close #1
strData() = Split(MyData, vbLf)
ReDim ArrName(UBound(strData), 188)
'Everything's good up to here
'Can I use the SPLIT command to parse out each single line containing 188, separated by "|", values?
Stop
End Sub