Hi All. I have an excel sheet and which contain in column A some Data. Assume in cell A3 value is “Hello Ui Path” and cell A5 value is “Hello”. I need to find cell A5 address. How can i do? Please help me
Excel Application Scope (Specify Excel File Path)
Read Range (Specify Range for Column A) → Output DataTable Variable: dtData
For Each (Type Argument: DataRow) → Values: dtData
If (Condition: row(0).ToString = “Hello”)
Assign cellAddress = “A” + (dtData.Rows.IndexOf(row) + 2).ToString
Break (to stop further iteration if the value is found)
End If
End For Each
Hello @Rambabu_N
Steps to Solve this question :
- Read Excel Data:
Use the “Excel Application Scope” activity to read the Excel sheet. Inside the scope, use the “Read Range” activity to read the data from the Excel sheet and store it in a DataTable variable, let’s saydtExcel
. - Loop Through DataTable:
Use a “For Each Row” activity to iterate through each row in thedtExcel
DataTable. - Check for Value:
Inside the loop, use an “If” activity to check if the value in the current row’s cell A matches the value you’re searching for (e.g., “Hello”). - Get Cell Address:
If the value matches, you can use therow("ColumnName").ToString
to get the value in the current cell, androw("ColumnName").ColumnName
to get the column name. You can concatenate these values to get the cell address.
Cheers!!!