How to align the first row in text file?


I have a text file with no of rows, In that need to align the first row in the text file.
Can someone guide me please , how to align first row?
Kindly refer attachment. (462 Bytes)

Thanks in advance,

are you writing data through write line
if yes then put “\t” 3 value

Hi @jamunatj ,

Could you let us know what method are you using to get the data in the non-aligned format ?

Is the Source the Text file itself ?

Thanks for the response @supermanPunch.
I need to convert excel data to text file, When i convert excel to pdf file the alignment is good on the converted PDF but when i convert PDF to text file , alignment changed in the first row, Could you please guide me. Kindly refer the attachment. (6.5 KB)

Thanks & Regards

@jamunatj ,

Is it possible to provide the PDF file or Excel file as that is the Source Data, and let us know if you are using Read PDF Text Activity to convert to text file.

Thanks for the response @supermanPunch

Kindly check the attachment and Yes I am using read PDF text activity to convert text file. (6.5 KB)

@jamunatj ,

When using Read PDF Text Activity, have you set the PreserveFormatting Property to True ? If not, Could you check with this property and let us know if you are able to get it in the right format.

Hi @supermanPunch

I have already set the PreserveFormatting Property as a True only. But I am unable to get the right format. Thanks!

Hello @jamunatj

Are you looking for a solution to read from excel and write to a text file?

If yes, from excel you will get the datatable. Then you can use Output datatable activity and convert to string. Then you can use Write Text File.


@jamunatj ,

I am able to get it in the format required.

Could you maybe also show us Screenshots of your workflow as to what are the steps taken to perform this ?

Thanks for the response @Rahul_Unnikrishnan

I have tried as you mentioned but the format getting differ.

Hi @supermanPunch

I have shared my code here
New (56.4 KB)
, Kindly check & guide me to fix the first row alignment. Thanks!

@jamunatj ,
Are you using any External Packages ?


I am not using any external packages. Kindly check the screenshot.

@jamunatj ,
Could you show us a Screenshot of your dependencies :

Also Check the below Sample workflow : (8.9 KB)

I have shared dependencies screenshot. Thanks!

I have tested with convert_PDF_To_Text code but facing same align issue.

Hi , I am still facing the alignment issue on text file. Can someone guide me please how to fix the alignment issue.