Reading Data from 3rd Row of Excel

Hi,

I want loop through 3rd Row to End
I wrote this expression Excel.Sheet(“Sheet2”).Cell(“A3:A89”) but the loop is running only A3. Each time it bot is taking A3 cell, it is not incrementing. Please suggest me what is the correct expression to loop through all the rows from 3rd row

Thanks in Advance

HI @Inchara_B_A

What activity are you using to loop, where you have written this expression: Excel.Sheet(“Sheet2”).Cell(“A3:A89”) ?

Hi,

If you are referring to this: Looping directly on excel file using Modern activites, take a look below:

Expression: Excel.Sheet(“TOC”).Range(“A1:B6”)

so instead of Cell in your expression use “.Range”

Hi @prateek.mehandiratta9

I want use this expression into “Type Into” Activity where I have to enter from Row 3 to the rest of rows till end. And instead of Cell, I tried Range and not working.


Hi @Inchara_B_A

Try this-

  1. Add a Read Range activity inside the Excel Application Scope to read the data from the desired sheet. Store the output in a DataTable variable, let’s call it excelData.
  2. Add a For Each Row activity to iterate through each row in the excelData DataTable.
  3. Set the range in the Read Range activity to "A3:Z" or any other range that covers all the columns you need. This will ensure that all columns are read, and you can access them in the For Each Row loop.

Thanks!!

Then what you are looking for is a write range activity instead of type into.

thanks,
Hope that helps

Hi @prateek.mehandiratta9

I want to Type into Web Application from Excel sheet from row 3 to end not into excel file

@Inchara_B_A

In the range property of for loop use

Excel.Sheet("sheetname").Range("Rangewhateveryouneed")

In the type into activities you have to use currentrow.ByIndex(indexofthecolumn).ToString

Index starts from 0 so if you need first column use 0

Hope this is clear

Cheers

Hi All,

I found out the solution for the above question.

Question: Reading data from Row 3 to end from a particular column. Pleas have look in the image and this expression works as per my requirement.

Thank you

1 Like

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