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 ...