public ActionResult ParseFile(string fileName)
        {
            if (HttpContext.Session[GlobalVariables.OAuthCodeKey] == null)
            {
                var model = new PSCoursesModel();
                return View(model);
            }
            else
            {
                var code = HttpContext.Session[GlobalVariables.OAuthCodeKey].ToString();

                var parameters = OAuthHelper.GetOAuthParameter();
                parameters.AccessCode = code;
                OAuthUtil.GetAccessToken(parameters);

                GOAuth2RequestFactory requestFactory = new GOAuth2RequestFactory(null, GlobalVariables.GoogleSpreadSheetAppName, parameters);
                SpreadsheetsService service = new SpreadsheetsService(GlobalVariables.GoogleSpreadSheetAppName);
                service.RequestFactory = requestFactory;

                //Parsing
                var startTime = System.DateTime.Now;
                var readCourseService = new ReadCourseFromFile(fileName);
                var parser = new PSCourseParser(readCourseService, defaultStartTime);
                var currentCoursesModel = parser.ParseCourses();

                var googleHelper = new GoogleDriveHelper(defaultStartTime);
                googleHelper.Service = service;
                var oldCourses = googleHelper.FetchOldCourseSheet();
                parser.UpdateCourseStatus(currentCoursesModel, oldCourses);

                var success = googleHelper.AddDriveSpreadsheet(currentCoursesModel);

                var endTime = System.DateTime.Now;
                var processingTime = endTime - startTime;

                ViewData["StartTime"] = startTime;
                ViewData["EndTime"] = endTime;
                ViewData["ProcessTime"] = processingTime;

                return View(currentCoursesModel);
            }
        }
        private bool WriteToGoogleDrive(PSCourseParser parser, PSCoursesModel currentCoursesModel)
        {
            var code = HttpContext.Session[GlobalVariables.OAuthCodeKey].ToString();

            var parameters = OAuthHelper.GetOAuthParameter();
            parameters.AccessCode = code;
            OAuthUtil.GetAccessToken(parameters);

            GOAuth2RequestFactory requestFactory = new GOAuth2RequestFactory(null, GlobalVariables.GoogleSpreadSheetAppName, parameters);
            SpreadsheetsService service = new SpreadsheetsService(GlobalVariables.GoogleSpreadSheetAppName);
            service.RequestFactory = requestFactory;

            var googleHelper = new GoogleDriveHelper(_startDate);
            googleHelper.Service = service;
            var oldCourses = googleHelper.FetchOldCourseSheet();
            parser.UpdateCourseStatus(currentCoursesModel, oldCourses);

            return googleHelper.AddDriveSpreadsheet(currentCoursesModel);
        }