/// <summary>
 /// The end of a participant report data section is marked
 /// by a row with "Counts households ..." in the first column.
 /// </summary>
 /// <param name="row"></param>
 /// <returns></returns>
 protected override bool IsDataRow(ExcelRow row)
 {
     return((!row.IsEmpty()) &&
            (!row[0].StartsWith("Counts households", ignoreCase: true,
                                culture: null))
            );
 }
        public static VestaReportSection create(
            ExcelSheet sheet,
            int top_row_idx,
            string marker_text,
            ReportTypes report_type,
            int year
            )
        {
            VestaReportSection retSect = null;
            ExcelRow           r       = sheet[top_row_idx + 2];

            if (!r.IsEmpty() &&
                (r[EMPTY_SECTION_MARKER_COLUMN]).Trim() != EMPTY_SECTION_MARKER)
            {
                switch (report_type)
                {
                case ReportTypes.Participant:
                    retSect = new ParticipantReportSection(sheet, top_row_idx,
                                                           year);
                    break;

                case ReportTypes.Labels:
                    Tuple <LabelType, RequestType> tu = parse_marker_text(marker_text);
                    LabelType   lt = tu.Item1;
                    RequestType rt = tu.Item2;
                    switch (lt)
                    {
                    case LabelType.Bag:
                        retSect = new BagLabelReportSection(sheet, top_row_idx, rt, year);
                        break;

                    case LabelType.Gift:
                        retSect = new GiftLabelReportSection(sheet, top_row_idx, rt, year);
                        break;
                    }
                    break;
                }
            }
            return(retSect);
        }
 protected override bool IsDataRow(ExcelRow row)
 {
     return(!row.IsEmpty());
 }