I have the following code…
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets.Add(“Documents”);
sheet.Cells.ImportCustomObjects(
list,
new[] {
“GenCode”,
“Description”,
“EffectiveDate”,
“LocationName”,
“LifeCycleStatusID_Text”
},
true,
0,
0,
list.Count,
true,
settings.ClientDateFormat,
false);
ID Description EffectiveDate LocationName LifeCycleStatusID_Text
There is an ID property on the objects in the list, however I do not wish to include this column in the Excel spreadsheet. As you can see above ID is not a member of the propertyNames array. How can I exclude the ID column from the resulting Excel file?