Example #1
0
        static void FilesExcelToCsv(string excelPath, string csvPath)
        {
            var filesXlsx = CsvFile.GetAllFilenames(excelPath, "*.xlsx");
            int i         = 0;

            foreach (var filex in filesXlsx)
            {
                string fileName  = Path.GetFileNameWithoutExtension(filex);
                string fileNameX = Path.GetFileName(filex);
                string filec     = Path.Combine(csvPath, fileName + ".csv");
                string fileNameC = Path.GetFileName(filec);

                if (!File.Exists(filec))
                {
                    System.Console.WriteLine($"{++i}) {fileNameX} - {fileNameC}");
                    CsvFile.ExcelToCSVFile(filex, filec);
                    // System.Console.WriteLine($"{++i}) {filex} - {fileName} - {filec}");
                }
            }
        }