Help to resolve end of expression encountered to concatenate user name in excel column for sending 1 email to all the user names in excel column

Hi, Team
I have a formula in Excel spreadsheet that works but when I transfer it to UI path, I encountered compiler error - end of expression expected when trying to run the xaml file.
The formula is to concatenate all the user names in 1 string so that an email can be sent to all the users in a column in excel spreadsheet. Here is the xaml file and the spreadsheet. Would appreciate your help to provide a solution. Thanking you in advance.


concantenate username.xaml (9.9 KB)
Invoice_Inquiry_Export.xlsx (9.3 KB)

The logic works in Excel doesn’t mean it will work in UiPath as a exact copy, you need to mold it per UiPath activities.
Having said that, some initial observations when I opened the attached Xaml is

  1. There us a For Each loop, with the textbox where it should loop being empty. Usually it takes a Datatable variable, which is created when a range is read using Read Range activity. Need to fix this.
  2. If you can mention your logic that you want to implement with respect to the excel sheet, it would be easier to help you out.

Kindly share your logic in simple terms with examples from excel sheet.

Hi, Sawaseem
Thanking in advance for your help. Actually, I am trying to create a bot to send reminders to users with days since invoice creation >2 days. The list of invoice is downloaded from a website After downloading it, the bot need to remove “,” from the “Current Approver” column. A reminder email is to be sent by the bot to each user listed in Current Approver column with invoices created more than 2 days ago. Each user is to receive only 1 email with the table that shows the headers in the excel file and only rows that have his/her names displayed. For example, in the attached file, Current Approver - Dick Dick Dick have 2 rows with his names. He should receive an email with the table showing the header and only the 2 rows with his names showing. Here is the excel file. Would appreciate it if you could help how I can create the bot. test1234.xlsx (10.0 KB)


@Bee1 Check attached zip file (25.3 KB)

Thanks, Indra for your file. i would like to find out how do I make “yourvariable” dynamic instead of tying it to a specific value since the invoice spreadsheet is dynamic, i.e. today the downloaded invoice spreadsheet may show Dick Dick Dick to have 2 outstanding invoices & therefore 2 rows with his names, tomorrow it may be Mary Mary Mary who have 5 outstanding invoices and therefore 5 rows with her names. How do I take care of it. Thanking in advance.

@Bee1 Can you specify from where you are getting name Dick Dick Dick to filter in excel

Hi, Thanks for quick response. It’s getting from Current Approver column in the spreadsheet.

@Bee1 In the assign activity just pass the name which you want filter.

Hi, Indra
I did as suggested but encounter the error that there is no DataRows?

. Can help to resolve the problem?
Here is the xaml file that I have edited. Main.xaml (12.2 KB)

@Bee1 It shows that there is no row for the name which you are trying to filter.Do one thing manually try once with the same name which you are trying to filter

Yes, it is working if I assign it to a specific name, e.g. Dick Dick Dick or Don Don Don but somehow when it is assigned to “Current Approver”, the error is encountered.

@Bee1 I think in assign activity you are passing column name Current Approver there you cannot pass column name if you want to change column name you needs to change in query that is in assign activity (new_Dt)

I don’t know what to do next to correct the error. Can you help to change the xaml file?