Thanks a lot for your response. I am quite new in vbscripting and still unable to write a complete code .

It would be great help if you could please provide me complete code. I need to just convert "pipe delimited" file into an excel .

Here is example of my text input file :-

Name|age|gender|department|year
praveen|23|male|computer|2010
ptalakes|23|female|arts |2018

Output should be in excel file as below in corresponding cell :-

Name age gender department year
praveen 23 male computer 2010
ptalakes 23 female arts 2018

Thanks in advance
Praveen