public void fs()
        {
            string testDirectory       = AppDomain.CurrentDomain.BaseDirectory;
            string excelFilesDirectory = Path.Combine(testDirectory, "ExcelFiles");
            string excelFileName       = Path.Combine(excelFilesDirectory, "Companies.xlsm");

            _factory = new ExcelQueryFactory(excelFileName, true);
        }
		public void fs()
		{
			string testDirectory = AppDomain.CurrentDomain.BaseDirectory;
			string excelFilesDirectory = Path.Combine(testDirectory, "ExcelFiles");
			string excelFileName = Path.Combine(excelFilesDirectory, "Companies.xlsm");

			_factory = new ExcelQueryFactory(excelFileName);
            _factory.UsePersistentConnection = true;
		}
Example #3
0
        public void fs()
        {
            string testDirectory       = AppDomain.CurrentDomain.BaseDirectory;
            string excelFilesDirectory = Path.Combine(testDirectory, "ExcelFiles");
            string excelFileName       = Path.Combine(excelFilesDirectory, "Companies.xlsm");

            _factory = new ExcelQueryFactory(excelFileName, new LogManagerFactory());
            _factory.UsePersistentConnection = true;
        }
 private void MapColumns(IExcelQueryFactory factory)
 {
     factory.AddMapping <Project>(p => p.Customer, "Customer");
     factory.AddMapping <Project>(p => p.Priority, "Priority");
     factory.AddMapping <Project>(p => p.Description, "Project");
     factory.AddMapping <Project>(p => p.LeadEngineer, "Lead Engineer");
     factory.AddMapping <Project>(p => p.SupportingEngineer, "Supporting Engineer");
     factory.AddMapping <Project>(p => p.LeadSales, "Lead\r\nSales");
     factory.AddMapping <Project>(p => p.SalesChannel, "Channel");
     factory.AddMapping <Project>(p => p.ProcessStage, "Process Stage");
     factory.AddMapping <Project>(p => p.Comment, "Comment / Next Action");
     factory.AddMapping <Project>(p => p.CriticalIssues, "Critical Issues");
     factory.AddMapping <Project>(p => p.SupportLevel, "Support Level (hr/week)");
 }
        public void csv_file()
        {
            var csvFile = Path.Combine(
                Path.GetDirectoryName(_excelFileName),
                "NoHeader.csv");

            _factory = new ExcelQueryFactory(csvFile);
            var companies = from c in _factory.WorksheetNoHeader()
                            select c;

            Assert.AreEqual(7, companies.Count(), "Company Count");
            Assert.AreEqual("ACME2", companies.First()[0].ToString(), "First Company Name");
            Assert.AreEqual(4554, companies.Last()[2].Cast<int>(), "Last Company Employee Count");
        }
        public void csv_file()
        {
            var csvFile = Path.Combine(
                Path.GetDirectoryName(_excelFileName),
                "NoHeader.csv");

            _factory = new ExcelQueryFactory(csvFile);
            var companies = from c in _factory.WorksheetNoHeader()
                            select c;

            Assert.AreEqual(7, companies.Count(), "Company Count");
            Assert.AreEqual("ACME2", companies.First()[0].ToString(), "First Company Name");
            Assert.AreEqual(4554, companies.Last()[2].Cast <int>(), "Last Company Employee Count");
        }
Example #7
0
        public Parser(string file, bool? test, IEmailManager emailManager,
            IStudentManager studentManager)
        {
            try
            {
                _excelFactory = new ExcelQueryFactory(file);
            }
            catch (IOException e)
            {
                throw;
            }

            _emailManager = emailManager;
            _studentManager = studentManager;
            _students = new Dictionary<string, Domain.Student>();
            _myOutlook = new Application();
            _isTest = test;

            _studentTask = Task.Factory.StartNew(PopulateStudents);
        }
 public void s()
 {
     _factory = new ExcelQueryFactory(_excelFileName);
 }
Example #9
0
 public Converter()
 {
     this.excelQueryFactory = new ExcelQueryFactory(System.Web.HttpContext.Current.Server.MapPath("~/App_Data/GNIS-County-Definitions.csv"));
 }
 public void s()
 {
     ClearLogEvents();
     _factory = new ExcelQueryFactory("");
 }
Example #11
0
 public DataContext(string path)
 {
     dataContentFile = path + "Content\\Data.xls";
     _factory        = new ExcelQueryFactory(dataContentFile);
 }
 public void Setup()
 {
     _factory = new ExcelQueryFactory(excelFileName);
     _factory.UsePersistentConnection = true;
 }
 public void s()
 {
     _factory = new ExcelQueryFactory(_excelFileName);
 }
Example #14
0
 public void s()
 {
     ClearLogEvents();
     _factory = new ExcelQueryFactory("", new LogManagerFactory());
 }
 public void s()
 {
     _factory = new ExcelQueryFactory(_excelFileName, new LogManagerFactory());
 }
Example #16
0
 public void SetUp()
 {
     ClearLogEvents();
     this.factory = new ExcelQueryFactory("", new LogManagerFactory());
 }
 public void s()
 {
     ClearLogEvents();
     _factory = new ExcelQueryFactory("");
 }
 public void Setup()
 {
     _factory = new ExcelQueryFactory(excelFileName);
     _factory.UsePersistentConnection = true;
 }