public static List <string> getRouteCustomerReference(string fileName, string path)
        {
            var routeCustomerRef = new List <string>();
            var openFile         = new WriteToExcel();

            openFile.Open(fileName, path, "Sheet1");
            var importCellsRef = openFile.WorkSheet.Cells["B2:B"];

            foreach (var Cell in importCellsRef)
            {
                if (Cell.GetValue <string>() != "" && Cell.GetValue <string>() != null)
                {
                    routeCustomerRef.Add(Cell.GetValue <string>());
                }
            }
            return(routeCustomerRef);
        }
Example #2
0
        public static List <string> getCompareId()
        {
            var CompareId = new List <string>();
            var openFile  = new WriteToExcel();

            openFile.Open("Nandos contact list 25.10.2018", $"{Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}/Temp", "owssvr (1)");
            var importCellsRef = openFile.WorkSheet.Cells["A2:A"];

            foreach (var Cell in importCellsRef)
            {
                if (Cell.GetValue <string>() != "")
                {
                    CompareId.Add(Cell.GetValue <string>());
                }
            }

            return(CompareId);
        }