We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Write multiple Collections to excel sheet

hi , 
i am new to this control and am trying to understand how to write a collection which has another collection inside it and write to excel sheet - I found that this method "ImportData" is used to dump the data to excel sheet but it doesn't work if i have another collection inside my first collection. do i have to write for loops ? 

essentially I want to be able to programmatically create a range of cells and assign the value of each cell to my collection.  so for example I have a list of cars with CarName and CarPlateNumber and another list called InfractionDates that needs to be printed in the excel as below 

    public class Data

        public string VehicleName { get; set; }

        public string PlateNumber { get; set; }

        public IEnumerable<DateTime> InfractionDate { get; set; }


VehicleID PlateNumber Date Time
Honda 126MSF 30-Sep-16 3:52:00 PM
Honda 126MSF 1-Oct-16 1:01:00 AM
Honda 126MSF 2-Oct-16 1:10:00 AM

VehicleID VehicleID Date Time
Mazda 293WVM 30-Sep-16 1:02:00 AM
Mazda 293WVM 1-Oct-16 12:23:00 AM
Mazda 293WVM 2-Oct-16 1:10:00 AM

if you can point me to a sample that I can create above output programmatically would be great ...

3 Replies

AV Abirami Varadharajan Syncfusion Team January 23, 2017 12:16 PM UTC

Hi Sasan, 

Thank you for contacting Syncfusion support. 

We have prepared sample to import data from a collection which has another collection. The sample can be downloaded from following location. 

Kindly refer and let us know if your requirement is fulfilled. 


SP Sasan Pasha January 24, 2017 11:59 PM UTC

Thank you so much. it certainly clarified a lot of things for me.

Many thanks 

AV Abirami Varadharajan Syncfusion Team January 25, 2017 05:10 AM UTC

Hi Sasan,
Thank you for updating us.
We are glad that your requirement is fulfilled. Please let us know if you need any further assistance.

Live Chat Icon For mobile
Up arrow icon