How can I maintain spacing in excel through Uipath?

My Excel table is like this. It means there’s fixed set ko character for each columns. What I need to do is concatenate after having values. But the problem is I am not getting the desired result. Say, If I COMBINED first two cells I need to have it like 23421432____(spaces depending number of remaining slot available since it’s not 16 digit account)__ and 3. Instead I am getting 234214323. Say, If I had to merged 5 cells and it has total of 50 characters allocated but I don’t have value in it. I want to have 50 empty spaces. I want it to happen for all the columns. How to do this in UiPath?
I need to convert excel file into notepad before uploading it

@Samraat_Maharjan1

Try including the spaces before the value in the excel cell so that those spaces might be retained

Or

I believe the first row speaks about how many characters are needed…you can use Lpad(str) or RPad(str) to include the spaces and then convert accordingly

Cheers

@Anil_G I had column up to Q. I need to copy data from another sheet and then have to merge cells. Should I need to predefine own data table and allocate specific character in each column. So, if my allocation in particular cell is 5 and i only have 3 digits, I want two spaces automatically when I try to merge. I won’t know how many character it might be in the each cell. I hope you are getting my point.

@Anil_G Yes, you are right. First row speaks about how many characters it can take. so, in a case it’s less than character it can take in a particular sheet, I want there to be space when I merge

@Samraat_Maharjan1

Str.padleft(17," ") - what this does is if there are lessthan 17 characters in the string then remaining are added as spaces on the left…

so basically you can create a loop on the datatable and add this pad statement so that each cell value is modified

Cheers

I have as many as 16 columns and each columns has different character limit(from 1 to 30)

@Samraat_Maharjan1

Use loop on coloumn and then get the pad value from first row and then use it

Cheers