Two columns in For Each Row - same excel

I have created an automation that will read two columns from a Excel sheet containing rows of names. The first columns names are in Japanese, and the second columns names are in English.
With that information, I want to search for each name on a web site, using the Japanese version to search with and then data scrape the content. For each person scraped, I have created an automation to Copy and move the data scraped contents file to a new location and then change the name of it, where I would like to input the English names column row, if that makes sense.

So all in all, I have a excel sheet with two columns (A and B) and I would like to do a For Each Row loop on both of them, but only use the A column for searching and B column for saving the file.

Is there anyone out there who have had a similar problem and/or a solution? I really need help and would like to know how to solve this issue!

When opening Excel to read DataTable and sequentially importing Acolum (Japanese name) values through “row(0).tostring” using for each row activity, search and scramble, and create file names, “row(1).tostring” I think you can create a file name for the English name version.
Good luck!

@David_Jang

Thank you for your quick response!
What you say makes a lot of sense and I am not sure why I had not thought about that until now.
I will try out your solution and get back to you whether it worked or not!
Thank you

@Robert_Wennberg

Have a good day! And if it works well, could you push the solution button? It’s my only pleasure.

@David_Jang

It seems like your solution would work, but I ran into another problem because of it.
It order to use your method I read the whole excel file rather than one column each, as I did before, thus resulting in the row(0).ToString to write the “Header” text into the search bar.
Is there any way to bypass the “Header”?

You can check whether a header is included in Excel read’s attribute item.

Or, if the read range activity range is given as “A2”, then the range from A2 to the end is the range.

1 Like

@David_Jang

Of course…
Thank you so much for clearing it up and helping me out. I tried reading the range as “A2” before but somehow could not managed to get the column “B” through Row(1).ToString. Now it seems to work as it should though.
Thank you!

1 Like

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