How to copy data from Excel to Text file with standard length

Hi Team,

I want to copy the values from excel file to text file but with the standard length as below…
Excel File:
Column 1 length should be :8
Column 2 length should be :8
Column 3 length should be :1
Column 4 length should be :6
It should be copy as below:
Even though if the column value is not as expected it should copy with spaces as below:

Have you tried with Output data table activity and then write the string to text file @RajeshT? I hope that will give you better results comparatively


Hi @HareeshMR ,

I have created the worflow based on your inputs,but its adding commas(,) in between and i need to maintain spaces if the standard length of column is less than the length.DataCopyStandardFormat.xaml (5.0 KB)

try replacing comma with TAB space using replace activity so that the text will be in the required format (somewhat)


Appreciate if you provide xaml,am bit confused in using replace activity.

Appreciate your help @HareeshMR @sarathi125 @lakshman

Hi @lakshman,Could you please help here with your inputs.


Currently i am in meeting now and will check it and update you by EOD.

1 Like

Thank you @lakshman and noted.

1 Like


I hope you will have headers in your excel file, and you need single space between all the texts.

Check the attached xaml, it will give you the result as you are expecting.
ExcelToTextFilePadding.xaml (12.6 KB)

1 Like

Hi @sarathi125 ,

Thank you so much,this is what i am expecting.Can we do it without column names?
I have requirement to merge without column names.


Check this one, Removed Add Headers while reading the excel range, and removed all column names from the workflow.
ExcelToTextFilePadding.xaml (12.5 KB)


This is Perfect @sarathi125 .

Thanks a ton!!

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