Excel Automation to get specific data

input

result

i want only
PO NUMBER MODEL QTY EXW HONG KONG Price

data in different sheet

@shruti, If it the cell number doesn’t change, you can use B11:I22 in Range of Read Range activity

Regards,
Dominic :slight_smile:

Exactly as @dominic said you can read the sheet from range B11 and store into a table then write table into target sheet :slight_smile:

cell number may change :frowning:

@shruti, In that case will find some workaround. Lets wait for other’s idea as well.

Regards,
Dominic :slight_smile:

@shruti, Follow these steps,

  1. Read Range - Output to a datatable (Say dt)

  2. Assign - Find the index of your desired first row (here PO NUMBER, MODEL,QTY…)
    integer Count = dt.Rows.IndexOf((From row in dt.Select() Where String.Join(“”,row.ItemArray()).Contains(“PO NUMBER”) Select row).ToArray()(0))

  3. Assign - Extract from that index till last row of datatable dt
    datatable dtFinal = (From row in dt.Select() Select row).Skip(Count).Take(dt.Rows.Count - Count).CopyToDatatable()

  4. Now use this dtFinal to output it in another sheet as per your need

Regards,
Dominic :slight_smile:

6 Likes

Thank you:-)

1 Like