Multiple assign columns from Excel file to a string

Hi all,

I’m still new to UIPath, so I hope I’m able to explain my issue properly.

I try to multiple assign columns (e.g. “ID”) from an excel file to a string in a ‘for each company’ loop.

I have tried the following methods:
str_ID = Company.ByField(“ID”).ToString
str_ID = Company.Item(“ID”).ToString

But they won’t work. Instead, the following error message appears:
“Multiple Assign: Can not assign ‘Company.Item(“ID”)’ to ‘str_ID’.”

Thankful for any help.

Hi @Sebastian8 , Welcome to the forum!

Can you please share the screenshot for the same.

Happy Automation!


Company.Item("IC-Code").ToString.Trim should work with what you have shown.

Hi Tim, thanks for your respond.

Unfortunately, the error remains the same “Multiple Assign: Can not assign ‘Company.Item(“IC-Code”).ToString.Trim’ to ‘str_ICCode’.”

check when using ByField instead of Item within the statement

Hi Peter, thanks for your help too,

error still remains the same: “Multiple Assign: Can not assign ‘Company.ByField(“IC-Code”).ToString.Trim’ to ‘str_ICCode’.”