/// <summary> /// Initializes a new instance of the <see cref="Table" /> class. /// </summary> public Table() : base() { // Set default values this.headerStyleKey = SharedMapStyleKeys.HeaderExport; this.subHeaderStyleKey = SharedMapStyleKeys.SubHeaderExport; this.footerStyleKey = SharedMapStyleKeys.FooterExport; this.subFooterStyleKey = SharedMapStyleKeys.SubFooterExport; this.properties = new PropertyCollection(); this.columnHeaders = new TableColumnHeaderCollection(); this.columns = new TableColumnCollection(); this.excelChartOptionsList = new List <ExcelChartOptions>(); this.items = new MapCollection(); }
/// <summary> /// Determine the number of column groups that are specified in the column headers /// These are additional grouped columns above the column headers, one for each level. /// </summary> /// <param name="columnHeaders">The column headers.</param> /// <returns></returns> private static IOrderedEnumerable <IGrouping <int, TableColumnHeader> > GetColumnGroupHeaders(TableColumnHeaderCollection columnHeaders) { var columnHeaderGroups = columnHeaders.GroupBy(x => x.Level).OrderBy(x => x.Key); return(columnHeaderGroups); }