Пример #1
0
        public static void ConvertFromSheetToCsv(
            string excelfile,
            string sheetname,
            string outdir)
        {
            using var workbook = new XLWorkbook(excelfile);
            var worksheet = workbook.Worksheet(sheetname);

            WindowsCsv.Write(
                GetRows(worksheet),
                Path.Combine(outdir, sheetname));
        }
Пример #2
0
        public static void ConvertFromBookToCsvs(
            string excelfile,
            string outdir)
        {
            using var workbook = new XLWorkbook(excelfile);

            foreach (var worksheet in workbook.Worksheets)
            {
                WindowsCsv.Write(
                    GetRows(worksheet),
                    Path.Combine(outdir, worksheet.Name));
            }
        }