IMPORT CSV WITH NON STANDARD DELIMITED ....
Have a txt file in c:\mytext.tx with 123.456 line similar:
aaaaaa*ssssssssssssss*sssssssss*nnnnnnnnnnnnnnnn*mmmmmmmmm
How to import in access table?
aaaaaa in field TEST1
ssssssssssssss in field TEST2
sssssssssin field TEST3
ecc...
the delimited character is [Ô]*[Ô]
i dont know if is possible with ado or not.
Tks for assistence and sorry for my bad english;-)
aaaaaa*ssssssssssssss*sssssssss*nnnnnnnnnnnnnnnn*mmmmmmmmm
How to import in access table?
aaaaaa in field TEST1
ssssssssssssss in field TEST2
sssssssssin field TEST3
ecc...
the delimited character is [Ô]*[Ô]
i dont know if is possible with ado or not.
Tks for assistence and sorry for my bad english;-)
Speech friend.
VBMANIA icephantom we see the solution below.
Just change the character ; so you use *
VBMANIA icephantom we see the solution below.
Just change the character ; so you use *
While Not EOF(2)
Line Input #2, ltext
sLine = ltext
ParseToArray sLine, A()
Sub ParseToArray(sLine As String, A() As String)
Dim P As Long, LastPos As Long, I As Long
P = InStr(sLine, [Ô];[Ô])
Do While P
A(I) = Trim(Mid$(sLine, LastPos + 1, P - LastPos - 1))
LastPos = P
I = I + 1
P = InStr(LastPos + 1, sLine, [Ô];[Ô], vbBinaryCompare)
Loop
A(I) = Trim(Mid$(sLine, LastPos + 1))
End Sub
ok tks for code..
but:
How to import in access table?
aaaaaa in field TEST1
ssssssssssssss in field TEST2
sssssssssin field TEST3
ecc...
but:
How to import in access table?
aaaaaa in field TEST1
ssssssssssssss in field TEST2
sssssssssin field TEST3
ecc...
Tópico encerrado , respostas não são mais permitidas