private static LearningSupportTableColumnStructure ParseContractTypesTableStructure(Table contractTypes)
        {
            var structure = new LearningSupportTableColumnStructure();

            for (var c = 0; c < contractTypes.Header.Count; c++)
            {
                var header = contractTypes.Header.ElementAt(c);
                switch (header)
                {
                case "Learning support code":
                    structure.LearningSupportCodeIndex = c;
                    break;

                case "date from":
                    structure.DateFromIndex = c;
                    break;

                case "date to":
                    structure.DateToIndex = c;
                    break;

                default:
                    throw new ArgumentException($"Unexpected column in learning support table: {header}");
                }
            }

            return(structure);
        }
 private static LearningSupportReferenceData ParseLearningSupportTableRow(TableRow row, LearningSupportTableColumnStructure structure)
 {
     return(new LearningSupportReferenceData
     {
         LearningSupportCode = row.ReadRowColumnValue <int>(structure.LearningSupportCodeIndex, "Learning support code"),
         DateFrom = row.ReadRowColumnValue <DateTime>(structure.DateFromIndex, "date from"),
         DateTo = row.ReadRowColumnValue <DateTime>(structure.DateToIndex, "date to")
     });
 }