How to get particuler cellvalue ( Example: F5) value from excl sheet

i have excl sheet contain many cell ,i want to know particular cell value at some condition

how to get cell value

1 Like

If you know the cell, you can use https://activities.uipath.com/docs/read-cell

Read Cell Activity,

Enter the Cell address in the Range Activity, for example if you want to read the cell value D4, then enter Range as “D4”

Buddy @sumanBera

Great…
So to get the value of a cell in an excel based on certain condition validated kindly follow the below steps that could resolve your issue

  1. Use excel application scope activity to open the excel file
  2. use read range activity to read the data in the excel and store the value read from excel to a variable of type datatable, named out_dt
  3. Use a for each row to iterate through each row, the reason why i m telling is to check with the data in each row with some conditions and this can be done by passing the out_dt as input to for each row loop and if condition activity to check for condition…
    like this
    out_dt will the for each loop input and we can access each row with row from for each row loop
    row(“Columnname”).ToString.Equals(valuetocheckwith) --(in if condition)
    if this condition gets passed, continue with then and use a assign activity to get the value in that cell like this
    out_cell_value = row(“Columnname”).ToString
    ================================================================
    or if you dont want to iterate through each row and you know which row and which column to evaluate you can directly go for if Activity that can evaluate the cell value in the row of a column like this
    inside if condition like
    – out_cell_value = out_dt.Rows(Rowindex)(“Columnname”).ToString
    or
    – out_cell_value = out_dt.Rows(Rowindex)(ColumnIndex).ToString
    or
    you can use read cell activity @sumanBera , the reason why tell this as last option is Read cell can be used if you know what value it would or what row it would be or what column it would be, so you must know all the conditions before we use a read cell, but thats what we are looking for now, at some conditions…and we may not be sure where the cell would and what row the cell will be…so it wont be a stable one…so i would kindly suggest to use the very first method to iterate through each row, validate the cell value of each row of a column with a if condition and then get the value of that cell using a assign activity, UNLESS YOU KNOW THAT THE CELL WILL REMAIN AT SAME PLACE…from where we are going to get the value

Hope this would help you buddy @sumanBera
If so kindly close the topic with right comment marked with solution that could help other looking for ideas under your topic buddy @sumanBera
Cheers

Hi Palaniyappan,

i have a excel sheet which contains some data and based on condition(Description= uber), it will calculate the 10% of that amount and should write in the next column in the specific cell.

can u help me to automate this?
Amountcal.xlsx (9.6 KB)