Exemple #1
0
 private void ReadExcelTransactions()
 {
     string file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, GetFromConfig("TransactionMapFilePath"));
     log.Log(string.Format("Opening {0} Excel file", file));
     try
     {
         if (File.Exists(file))
         {
             Application xlApp = new Application();
             Workbook xlWorkbook = xlApp.Workbooks.Open(file);
             //CreateTranUnitMappedEntities(xlWorkbook);
             xlWorkbook.Close();
             xlApp.Quit();
         }
     }
     catch (Exception e)
     {
         log.Log(string.Format("Error processing {0} Excel file: {1}", file, e.Message));
     }
 }
        private void ReadExcelTriggers(string filePath)
        {

            log.Log(string.Format("Opening {0} Excel file", filePath));
            try
            {
                if (File.Exists(filePath))
                {
                    Application xlApp = new Application();
                    Workbook xlWorkbook = xlApp.Workbooks.Open(filePath);
                    ExtractExcelTriggers(xlWorkbook);
                    xlWorkbook.Close();
                    xlApp.Quit();
                }
            }
            catch (Exception e)
            {
                log.Log(string.Format("Error processing {0} Excel file: {1}", filePath, e.Message));
            }
        }