Export ExpandoObject to excel in C#

68 Views Asked by At

I am using EPPlus to export a list of expanded objects to an Excel file. Initially, I had a single column containing a list of persons separated by ';' (so, the type of object to export was known beforehand), and I was exporting this list within the same column. However, the requirements have changed, and now I need to export each person to a separate Excel cell.

Organasation           Adress             Employees

 org1                   Adress             Emp1;Emp2;Emp3...

V2 I want it like this

Organasation           Adress             Employee1        Employee2       Employee3     ..

 org1                   Adress             Emp1              Emp2              Emp3     ...

I tried to export object as expandoObject() as the method expects as input a List

0

There are 0 best solutions below