Convert txt to xlsx

this example, i need to convert this example text to excel by row by column. i hope u undertand based on my attachment given.


Hi @syaheed22,

Read that text file,check the data how it is coming
then proceed to convert

Use read csv activity and get the rows in the csv as datatable , then transpose the datatable and store it in another data table keep appending your main data table with all csv files and at the end use write range and set add headers …

1 Like

Hi @syaheed22

please find attached code which will convert text file data into excel headers.

Steps Included

  1. Read data from text file.
  2. Split data by using split function delimiter as Environment.Newline which will return array.
  3. Assign New Datatable() to the Datatable.
  4. Use for each loop with add data column activity to add data to datatable as column.
  5. add a single datarow to datatable.
  6. Write range into excel file with Add headers option check. (16.3 KB)

Vijay Kumar C.


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