I have two columns in Excel. How to read Column G based on user input variable then output value in column H?
For example,
Arr input = {“A”, “D”}
then I want {“111”, “444”} as output
I read excel and put the data into a datatable, then what?
I have trouble getting the row index of column G based on input, please help.
After getting the row index, I am thinking to use for loop and get row item for Column H.
If you already have string array for user input u can
1.use for each for array 2.us for each row activity inside array foreach take datatable which is read from excel
3.if row.item(0).ToString =item.tostring
Inside if use write line row.item(1)
This is will.work only if your data table has just 2 columns else change column indexe to appropriate values