Hello, I have a table from an application which i am reading. I cannot use any screen scraping methods.
Let’s say you have a column that looks like the column below (City is the header):
City
Miami
Tokyo
Lagos
Paris
After copying this column to the clipboard I output it with the name string_Variable
If i use the below code, the first item is City but I want the 1st item to be Miami item = split(string_Variable,Environment.NewLine)
What addition do i need to make to the code to get Miami as the 1st item?
look into the properties of the read action. if possible, check “colom names”, this way it interprets the first row as description. you won’t need to skip the row and can shorten the processing time.
this actually just gets each character out of the first line. for instance instead of getting Miami as a whole for each iteration, you get a letter → M
→ i
→ a
→ m
→ i
Hello @alejohnson
the number inside skip method is used to specify the number of elements we have to skip and not its index or position.
So as in your case we have to skip the first element so we use Skip(1) instead of.
you used skip after splitting the data to an array variable right ?
did you follow the exact step as i told you?
Check this workflow to understand more clearly here i took text from clipboard Split it using new line and used the skip method
@vickydas this is how my code looks in a for each:
for each item in split(string_Variable,Environment.NewLine).skip(1).toarray
.
.
.
code continues…
I have log messages in the code just to see what the 1st items will be and it still showing me the column headers. I’ll take a look at your attachment you just added.