How to convert txt file to excel file

I need txt file convert to the excel format does anyone know about how to do it

@DinukaThilakarathne How is your Text File, in which Format is it in? Can you send a Screenshot of it?

@supermanPunch

@DinukaThilakarathne Can you send the text file , I’ll try to do it from my end. This seems a bit difficult to perform :sweat_smile:

@supermanPunch
i found a way

@DinukaThilakarathne Ohh Good Going. Can you Post the Solution if it worked. So it might help others to Solve it faster :slight_smile:

@supermanPunch
it’ss not depending on Ui Path i did it using Excel macro

1 Like

@DinukaThilakarathne Ohh oK, It would be Good if you were able to send the Macro :sweat_smile:

Can you share the macro…I am also looking for a solution.
Does this works with any template?

Hi @amithvs

Sorry for the late reply.
use this code txt file can open csv format don’t forget create a variable.

Ex -
Dim FilePath As Workbook
Set FilePath = Workbooks.Open(“D:\Rec|Statement\GBL\SLC.txt”)

Thanks for responding. I didn’t quiet got the solution you suggested. Just giving the text file like this will open in csv, but will the output be structured, like column rows separated.