Try this demonstration in a new workbook, just amend the CSV constant :
PHP Code:
Sub DemoReadUnicode()
Const CSV = "D:\Tests4Noobs\test.csv"
Dim SP$()
If Dir(CSV) = "" Then Beep: Exit Sub
With CreateObject("ADODB.Stream")
.Open
.LoadFromFile CSV
SP = Split(.ReadText, vbNewLine)
.Close
End With
With Sheet1.Cells(2)
.CurrentRegion.Clear
With .Resize(UBound(SP) - (SP(UBound(SP)) > ""))
.Value = Application.Transpose(SP)
.TextToColumns , xlDelimited, xlNone, True, True, FieldInfo:=[{1,2}]
End With
End With
End Sub
Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
_______________________________________________________________
Je suis Charlie
Bookmarks