You put the file into a string. Then split that string into an array by the major divider. Then go through each element of the new array and split each one by the minor divider. Assuming that "|" is the major divider:
Dim strFileContents as string
Dim strMajorElements() as string
Dim strMinorElements() as string
Dim i as Integer
'get file contents
strFileContents = ....
'split the contents by "|"
strMajorElements = split(strFileContents,"|")
'go through each element
For i = 0 to Ubound(strMajorElements)
'split the element by space
strMinorElements = split(strMajorElements(i)," ")
'save the minor element to db (I'm assuming)
....
Next i
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.