How do i read multiple lines from one excel cell and split the multiple lines as single values


so the result should be like: BR5876 and BR0978 as two different values.

Your help is appreciated. Thankyou!

Hi @HiteshJeswani101,

Welcome them to our community!

You can use Excel application scope activity and read cell activity to read the cell data.

Then you can replace the string result with blank space for the Enviornment.Newline character to make it as a single string item.

If you are looking for something else, please elaborate.

Hi there and welcome!

You need to split that value on chr(10), which is a new line character used in Excel (worked for me). My workflow:

Read the excel cell into a string variable (can also read to a datatable and use a for each row loop). Then use some sort of a split method, which will generate an array, that you can loop through.
I used a Microsoft Activity called “Split String”, that comes with “Workflow Manager Activities” by Microsoft package, which you can find in the package manager.

In the properties, the input is your variable that you read from Excel, Result is an Array of String variable, and in the Separator, enter chr(10).

This way you will get the two values as separate array values as well.

I am not sure if the Environment.Newline works here - din’t work for me, but it was the first thing I tried as well. Used Chr(10) instead

Thanks a lot! It worked for me!

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