@Unable to read the excel cell


I can able to read the cell with single word without newline in excel but unable to read if multiple lines inside the cell.
I need to the cell in column “Address Line1”
9Location Data Cleansing_RawData - Copy1.xlsx (14.5 KB)


1 Like

Any update

This cell?


Actually I was passing this value to another workflow…may be I need to split before passing into another workflow

How can I split that according to next line?

“one capitol mall” as a address
Another line as city
Next as a state and pin

String[] lines = Split(Address.Trim, Environment.NewLine)
 validate lines count here and based on that perform below logic
    address = lines(0) 
    city = lines(1)
    State = Split(lines(2)," ")(0)
    Pin= Split(lines(2)," ")(1)

Thank you so much

Getting Index out of bound exception. Please help me.
I think it is not splitting properly.
validated the count it is not splitting
PFAMain.xaml (124.5 KB)

Can you try this?

Regex.Split(StoredREsult, "\r\n|\r|\n")

Imported the System.text.regular.expression namesapce
used the below syntax:
Regex.split is not working (Split method in not populating)
string substrings = Regex.Split(input, pattern);

Working I took regex as a variable of type regex but same error index out of bound exception. Please help me on this.

Is it for the same excel? I get the output using Regex.

088760149dfd92f6a14e6134453551d60305438a.xaml (127.5 KB)


If it is single line I should not split.
If it multiple lines I need to split the string
If cell having multiple line I have to split it.
By using regex it will always return 1 as index. I want number of lines to assign the city and address and pin and state.
Perfect. It is working now.