Conveert Text file to datatable

Hi Devs, pls kindly advise on the logic to convert attached text file to datatable regards
textfile.txt (5.6 KB)

@RPA-botDev

Try using generate datatable activivty with fixed width…looks like the document is fixed width itself

Cheers

Hi @RPA-botDev ,

Noticing that the structure of the text also contains other free text, We would like to understand the Output format/Column Structure required, so a help would be to give us the Expected Output for the Text file provided.

This way we would be able to reach to your solution faster.

The file is not any type of data format. It’s a report output. You can’t just one-step convert it to a datatable.

It looks like you have two different sets of data, one for currency code 840-USD and another for currency code 566-EUR. And within those two, there are two separate sets of data - one with BUSINESS SERVICE ID and another with CYCLE ACTIVITY.

Can you manually type up what you want the final datatable to look like, in CSV format, and share it with us?

Hi @RPA-botDev

=> Use Read Text File actitvity to read the text file and store the output in a variable say str_text
=> Use Generate Data Table from Text activity and give input as str_text and store the output in a variable which will be of data typeSystem.Data.DataTable.
=> Use Write Range Workbook to write the data Table to excel.

Hope it helps!!

Hi @RPA-botDev ,
You can try
TextToData.xaml (6.5 KB)
image
Regards,
LNV

I need get this number below, the member ID and the run date

@supermanPunch, pls refer my response below

Hi @RPA-botDev

Send the text file we can help you in extracting the text with regex expressions.

Regards

textfile.txt (5.6 KB)