예제 #1
0
        public int RowSpan(ExcelHeader header)
        {
            int rows = 1;

            if (header.SubExcelHeaders.Count() > 0)
            {
                rows += 1;
                foreach (var sub in header.SubExcelHeaders)
                {
                    rows     += RowSpan(sub);
                    sub.Level = header.Level + 1;
                }
            }
            return(rows);
        }
예제 #2
0
        public int ColSpan(ExcelHeader header)
        {
            int cells = 1;

            if (header.SubExcelHeaders.Count() > 0)
            {
                foreach (var sub in header.SubExcelHeaders)
                {
                    cells += header.SubExcelHeaders.IndexOf(sub) == 0 ? 0 : ColSpan(sub);
                }
            }

            return(cells);
            //return SubExcelHeaders.Count();
        }