Need to get data from excel sheet on specific range like first row and 17th row

Need to get data from excel sheet on specific range like first row and 17th row

@RachelN

Read the excel using Read Range Activity and store it in DataTable variable(dtVar)
Then assign the below code to get specific row values
1st Row - dtVar.Rows(0)
17th Row - dtVar.Rows(16)

I don’t understand if you want only 1st and 17th row, or from 1st to 17th,

If you want only 1st and 17th, then use read row activity which will read a single row

if you want to read 1 - 17 rows, then read range activity as “A1:P” + rowCount.Tostring

I don’t know exactly P is the 17 column :stuck_out_tongue:

@RachelN

Please find the working for 1 and 17th - row value from an excel.

Row.xaml (8.5 KB)
Hope this will help you.
Thanks
Suresh J

Hi @sureshj

I want all the column in row 17

and i want to use workbook not excel scope

@RachelN

Using Add data row you can add the 17 row to a new datatable and write in a new sheet. And I have change it to a workbook
Row.xaml (9.3 KB)

If you want to get value of 17 row columnwise then,
Variable 1 = row(0).tostring OR row(Column name).to string
Variable 2 = row(1).tostring OR row(Column name).to string
Hope this will help you.

Thanks
Suresh J