I am trying to import some data from csv file, and I noticed special characters which I copied to notepad++ and it showed me SOH special character. Then I searched how to remove this special character, and tried several topics but with no use
Any ideas?
This is my code (the weird point is that I can see the contents in locals window but couldn't print to activecell
Code: Select all
Dim x, v, myPath As String, fn As String, txt As String, i As Long
myPath = ThisWorkbook.Path & "\MyFiles\"
fn = Dir(myPath & "*.csv")
Do While fn <> ""
With CreateObject("ADODB.Stream")
.Charset = "UTF-8": .Open: .LoadFromFile myPath & fn: v = Split(.ReadText, vbLf): .Close
End With
ActiveCell.Value = v(9)
Exit Do
fn = Dir
Loop