Excel has built-in options to read files where fields are delimited by tabs, semicolons, commas, or spaces. : Text to Excel « Excel « VBA / Excel / Access / Word






Excel has built-in options to read files where fields are delimited by tabs, semicolons, commas, or spaces.

 
Sub Main()
    Workbooks.OpenText Filename:= "C:\sales.txt", Origin:=437, DataType:=xlDelimited, Other:=True, OtherChar:= "|", FieldInfo:=...
End Sub  
  

 








Related examples in the same category

1.Import a file
2.Opening Delimited Files Simplified
3.Opening Fixed-Width Files