Exemple #1
0
        public static void Main(string[] args)
        {
            IWorkbook crosswise      = ExcelUtility.GetWorkBook(GetConfig("crosswise"));
            IWorkbook lengthways     = ExcelUtility.GetWorkBook(GetConfig("lengthways"));
            IWorkbook paper          = ExcelUtility.GetWorkBook(GetConfig("paper"));
            IWorkbook targetTemplate = ExcelUtility.GetWorkBook(GetConfig("targetTemplate"));

            Dictionary <string, AcademicAchievements> resultDictionary = new Dictionary <string, AcademicAchievements>();

            //ISheet templateSheet = targetTemplate.GetSheetAt(0);
            //professorNames = getProfessorNameFromTemplate(templateSheet);

            foreach (var item in professorNames)
            {
                resultDictionary.Add(item, new AcademicAchievements(item));
            }

            ISheet paperSheet = paper.GetSheetAt(0);

            getPaperInfo(paperSheet, resultDictionary);
            ISheet crosswiseSheet = crosswise.GetSheetAt(0);

            getProjectInfo(crosswiseSheet, resultDictionary);
            ISheet resultSheet = targetTemplate.GetSheetAt(0);

            setResultValue(resultSheet, resultDictionary);

            List <ISheet> sheets = new List <ISheet>()
            {
                resultSheet
            };
            IWorkbook workbook = ExcelUtility.CloneSheets(sheets);

            ExcelUtility.WriteWorkbookToFile(workbook, GetConfig("result"));
        }