How to group the multiple row into one row using LINQ?

Hello Guys-Excel file having more than 100 columns and 50 rows,i want to group the three rows into one row,two rows into one row based ID column Value,if ID column value is same for three rows,i need to group the three rows into one row.

Hi @Lakshmi_N

I have some query regarding your issue so that i can try to provide you the solution

  1. You mean to say that If any particular ID within Column Name :- “Column ID” For eg: “123” is again present below in other rows of Same Column Name :- “Column ID” within the same Excel then you have to make it as Single time Occurance
    Right ??

  2. My another que is that, Does the 100 Columns which you said will contain the same Data for all the Occurance for that Grup of Same ID ??
    In my eg ID is “123”

Can i get the SS for your Excel Data which you are talking about

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

‘ID’'=2345,this ID column value will be the same for 3 rows or 2 rows or one row,if this ID column value will be same for 3 rows,i need to group those 3 rows into one single row,or else,if ID column value is same for 2 rows i need to group these 2 rows into one row.

ID column value not static,it will always differs the column value.


Hello Lakshmi,

Were you able to find a solution for this ?