Beispiel #1
0
        static void Main(string[] args)
        {
            var    settings           = Settings.From("app.json");
            string folderWithWordDocs = settings.DocumentsLocation;

            string excelResultsFile = "Contractors.xlsx";
            var    wordExtractor    = new WordContractExtractor(folderWithWordDocs);

            wordExtractor.ExtractToFile(excelResultsFile);
            Console.WriteLine("please see Contractors.xlsx");
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("please enter the folder with financial Word documents( press enter for current folder)");
            string folderWithWordDocs = Console.ReadLine();

            if (string.IsNullOrWhiteSpace(folderWithWordDocs))
            {
                folderWithWordDocs = ".";
            }
            string excelResultsFile = "Contractors.xlsx";
            var    wordExtractor    = new WordContractExtractor(folderWithWordDocs);

            wordExtractor.ExtractToFile(excelResultsFile);
            Console.WriteLine("please see Contractors.xlsx");
        }
Beispiel #3
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     try
     {
         string folderWithWordDocs = folderPath.Text;
         if (string.IsNullOrWhiteSpace(folderWithWordDocs))
         {
             MessageBox.Show("please choose a folder");
             return;
         }
         string excelResultsFile = "Contractors.xlsx";
         var    wordExtractor    = new WordContractExtractor(folderWithWordDocs);
         wordExtractor.ExtractToFile(excelResultsFile);
     }
     catch (Exception ex)
     {
         MessageBox.Show($"an error occured{ ex.Message}");
     }
 }