Convert txt to excel?

I want to convert txt and write it in excel.
text.txt (137 Bytes)


I want copy in column Flag_RM_Return = B only

And Write in file excel ( write next row from input file)

File Input as below. Ex code Lot.xlsx (18.5 KB)


I want to copy data from text file to file input as below.

*write in Column Status if column Flag_RM_return = B —> write text ตัดออก

Please guide me about it.

Hi @fairymemay

we have an activity called Generate DataTable activity
where we can pass the text, a string variable as input and get the output as DataTable which can be written to a excel with write range activity

Have a view on the doc for more Info

Hope it will help


@Gokul001 I don’t know how to write in column Status = ตัดออก ?

Have a view on the thread

Hope it will resolved your query @fairymemay


I can’t understand how to work it?

Please guide me or example flow for solve this case.

Can you share the Input text file and xaml workflow @fairymemay

@Gokul001 File input as attached.

Ex code Lot.xlsx

Hi @fairymemay

Have look into the screen shot

Use Generated Data Table Activity


@Gokul001 And how to write append in file input and write column Status = ตัดออก ?

You Need to return the status in the Excel or text file?


@Gokul001 In excel file input

Do you have any condition for returning that specific status?

If yes you can try like

  • Read Range the excel file store in the Datatable
  • Loop through the Datatable
  • If row(“Flag_RM_Return”).toString = “B” (Think so this is the condition)
    then - The processs you need
    else - the process you need


1 Like

@Gokul001 write data from text file to in file output next line in latest row ( column NO , Flag_RM_Return And write column Status = ตัดออก )

Query is not understandable can you elaborate please?


Hi @fairymemay,

Can you flow the below steps.

  1. Read the text file using Read Text File activity.
  2. Use Generate Data Table activity and set the options with reference to the below screenshot.

Format as CSV
Column Separator as “|”
Enable the First row as Column Headers

Send the read text activity variable as input to the Generate Data Table and output of this table, use the write range to see the resultant in the excel.

For your reference, a sample XAML workflow is shared. (6.4 KB)



This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.