Linq Query to Filter Columns and convert that filtered columns to rows


need a help to filter the columns and if that column found then convert it in to rows as shown in the Screenshot.

Please help to find a resolution for this using Linq/Lambda function.

Thanks in Advance.


How about the following sample? (9.9 KB)


Hi @Yoichi,
Thanks a lot for this approach.
But adding to this, I would like to share a concern. Can we use “.Take” to get multiple columns? Because, in actual scenario we have around 84 columns out which we only need to take 28 dynamic columns. So, it seems skip will make
this complex. Could please share a workaround for this?


Can you share input files and expected output as file? It’s no problem if dummy data.


Test.xlsx (26.0 KB)
Please find the sample and I have mentioned the details.
Thanks in Advance. :slight_smile:

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