Get two datatbles from a master datatable when i have row indexes in my hand

Hi Team,

I am having a datatable as shown below:-

FOLLOWING ARE THE REQUIREMENTS:-

  1. I want to extract the two small tables from this datatable as dt1 and dt2. (marked in green).

  2. Since I am having a datatable in my hand, read range is not in the picture, want to play just with DT.

  3. I am having the datatable row indexes of the required tables ie (5 to 7) and (12 to 14). All columns.

  4. I just want the green marked tables in two different datatables (dt1 and dt2 respectively).

  5. PLEASE IGNORE THE HEADERS IN THIS CASE, WE JUST NEED TO PLAY AROUND WITH ROW INDEXES.

Kindly let me know if anything else is needed from my side.

Thanks and Regards,
@hacky

@HANACCHI, @Pradeep_Shiv, @Palaniyappan Any idea?

Hello,
Here is the easiest way

  1. So first you should build the datatable (but you already have it)

  2. Then clone its structure to dt1. Data is not copied, only the structure and format of columns.

  3. Add data row one by one

  4. In Add data row please input the rows in the following way. For dt1 indexes are 3,4,5

Repeat the steps for dt2
image

Indexes are 10,11, 12

@alisa.kliuchnikava

This looks incredible, but yet to try it in my scope. As you see what I shared here, this is just a dummy so need to see how it would work in my case.

Also, quick question, can you tell me how can I use the Range instead of using add datarow one by one dynamically?

like i have start and end range for example 4 and 10.

I want to add rows such that there are rows from 4,5,6…10 only

regards,
@hacky

@Lahiru.Fernando, @lakshman, @KarthikByggari

Please help.