How to split string into array at the end of every line

I would like to change the strings into an array, so that when I run it through a for loop it would be like this

235521254_WB_MME,2321099136_INV, 2321099136_PL

235521254_WB_MME,2321099390_INV, 2321099390_PL


This is the current output of it, which if I were to run it through a for loop it will print the out character by character


Welcome to the community

Please use this
Arrayvar = str.Split({Environment.NewLine},Stringsplitoptions.RemoveEmptyEntries)

Str is the string variable where the data is stored


1 Like

It works for me.

1 Like


Thanks for the help and warm welcome!

1 Like

Hi there just a follow up question that I have. Lets say I want to search for a file with the output values, would they have to be in string format?


Can you please elaborate? when you say they have to be in string format? which one are you referring to?


Let me elaborate. So right now for example I want to search with Path Exist for these 3 files.
235521254_WB_MME, 2321099136_INV, 2321099136_PL (currently in array format)

would they need to be in string if I want to search individually out of the 3? So the system would search with 235521254_WB_MME first and so on.



Yes they should be in string format…like say array is vararray then vararray(0) will give you the first string

Hope this helps


1 Like

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