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)); }
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)); } }