Question : Import multi delimeted Txt to excel

I have the following Txt format
00344000000000193000450000300110000020000090001122000020002009100040002201100020
00263400037000280520007000650530011000720640005000830560006000880690007000940740
01300101074001800114029001800132,MON-000001,20050901,C,imp,M,XYZ,ABC,EFG,1993,153 p,001.40,ABC,^

Note:
field delimeter: ,
Record delimeter: ^

Thank you

Answer : Import multi delimeted Txt to excel

Here's a simple vbscript that will do the job, just edit for the correct name of an input file and output file and run as follows.

cscript whatever.vbs

(assuming you saved the attached as whatever.vbs)

~bp
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Set fso = CreateObject("Scripting.FileSystemObject")
Set oldFile = fso.OpenTextFile("c:\temp\oldfile.txt")
Set newFile = fso.CreateTextFile("c:\temp\newfile.txt", True)
strData = oldFile.ReadAll
strData = Replace(strData, vbCRLF, "")
strData = Replace(strData, "^", vbCRLF)
newFile.Write strData
oldFile.Close
newFile.Close
Set oldFile = Nothing
Set newFile = Nothing
Random Solutions  
 
programming4us programming4us