How to read the excel column name starting from row 10?

Hello UiPath Team,

I’m reading an excel rows using excel application scope by looping through the for each row activity, but the problem is column name doesn’t start at row number 1, column name starts from row number 10. Can anybody help me with this issue? Thanks in advance!

Hi @Mahesh5491

Welcome to UIPath Community

In read range activity please check the range in cells tab and specify the range from A10

Regards,
A Manohar

@Mahesh5491

Use Read Range Activity and specify range as “A10”. Then it will start from cell A10 to till the end. If it has Headers then select AddHeaders option also.

3 Likes

Hi,
The row number may change in future, I don’t want to hard code it, I want to find it dynamically. Is there any way to find it?

Hi @Mahesh5491,

Please brief your requirement.
What is the case to find that row?

Hi,
As shown in the sample attachment, i want to read the rows starting from row number 11, i don’t want to hard code the value as “A11” in read range activity, because in future if some more lines gets added above the column name “EmpID” the row number will change. So can you please suggest me any solution on how to do it dynamically.

Capture

Hi @Mahesh5491,

Sound’s good for the explanation.

  • Read the excel.
  • Loop it by ‘For Each’.
  • Use ‘If’ Condition to check the ‘0th’ column, if it’s contain a string as “EmpID”.
  • Once condition is true, then copy that row into another table.
  • And do the last step for followed rest of the rows (Note: But the condition will not satisfy for rest of the rows. So use some flags to satisfy that.).

I hope the above will be helpful for you.

Thanks and Regards,
Manoj Vijayakumar.

Thanks for the response…I will try it.

Hi @Mahesh5491,

Go through the below workflow to get the dynamic count
Main.xaml (10.0 KB)

Book1.xls (16.5 KB)

Regards,
A Manohar

Hi,
Thanks for your response. The workflow which you have sent, in that i want to delete rows above empid. how can this be achieved? I tried deleting using remove datatable rows, but it didn’t work. PFA…
DynamicRow.xaml (12.3 KB)

Hi @Mahesh5491

Try to use Delete range activity for deleting a specific range where for deleting rows above empid just take a new variable
delRange=int-1
assign this variable in range it will work.

Regards,
A Manohar

Thanks alot @Manohar1.