Create pivot table without excel

How to create pivot table from a datatable without using excel(application / Interop) ?
I can use (linq) groupby but it ends up as a normal loop through the grouped list and can be time taking for large table or computations. Is there any other way of creating pivot tables without having excel installed?
i want to store the final pivot table into a normal datatable and finally print it somewhere(csv/xl, I do not want particularly editable excel pivot tables)

Hey @saurabhB

When you say pivot it’s bit generic…

So, Kindly explain your business case to suggest a non-excel basically a query method ?

Thanks
#nK