Trim for System.Array


I am trying to use item.trim.split in For each Activity(for each ITEM in strArray) but the error Im getting is ‘trim is not a member of Sytem.Array’.

How to resolve this. I tried adding Assembly Reference manually in your xaml file. But no change


Try item.ToString.Trim

I have AddDataRow in for each loop where AddRow is - “{item.ToString.trim.split(“ ”.ToCharArray.Trim)(0), item.ToString.trim.split(“ ”.ToCharArray.Trim)(1), item.ToString.trim.split(“ ”.ToCharArray.Trim)(2), item.ToString.trim.split(“ ”.ToCharArray.Trim)(3)}”

Please use typeArgument as String thats enough.

Please find the below screenshot.




@KarthikByggari Still the same error

Can you please share your array values is it a ArrayofString…?

Value of 1-Dimensional array of string cannot be converted into string

1 Like

Still I can see the same issue

1 Like

Yes the value of Typeargument is string only

Kindly share us a sample input and output we need from it

aaha i didnt see this
Fine no worries
can i have a sample input and output that we need from it

will you share your xaml or input?

1 Like

This is the Input and output sheet

Iam reading the data from the inputExcel cell and the result is stored into str. Now assign an array strArr=str.Split(Environment.NewLine.TocharArray).
Ad d for each ITEM in strArr where ITEM is string.
Add AddDataRow activityinto for each loopInputExcel.xlsx (8.2 KB) OutputExcel.xlsx (8.3 KB)

split it by VbLf instead of environment.newline

Main.xaml (15.4 KB)

try this

To trim (or different edit) of all items in the source array (arrInput), you can use this expression:

arrInput=arrInput.Select(Function(x) x.Trim).ToArray


1 Like