Excel Get Range Dynamic Rows and Copy to New Sheets

I have an Excel file that I’m looking to copy the values from one sheet to another based on the data between rows.

I started off by reading the Range of the Excel file and then creating a condition IF statement. But this is where I’m not entirely sure what would go next. My IF statement is: dt.Rows.ToString = “Header1”, Then Read Row. But I’m not sure how I would read the rows up until the next header labeled Header2.

I’ve attached a sample Excel document that shows what I’m trying to do.

Any guidance?

Thanks.sample.xlsx (9.4 KB)

Hi @jcurry500

Welcome to UiPath Community
header.zip (15.9 KB)
here you go buddy @jcurry500
hope the below xaml that could help you
Kindly correct me if i have understood the query wrongly

Cheers

Thanks! My first real time with UI Path. Let me take a look and see what this does and will update this message if I have questions. Thanks again!

1 Like

any issues with that buddy @jcurry500

1 Like

Hi! I’m following the logic but I’m not seeing where the rows would be copied to their respected sheets.

For instance: Header1 is in row 3 so the data from row 4 to row 7 would be copied to the Header1 sheet.

I don’t see in the IF sequence where it does that unless I’m not seeing it correctly?

Thanks!

1 Like

aaha, if that is the requirement
here you go buddy, its resolved
header_modified.zip (17.5 KB)
Hope this would help you
Cheers @jcurry500

1 Like

Excellent! You’ve been very helpful! Thank you.

1 Like

Fantastic buddy
Cheers @jcurry500
Keep going

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