public Workbook CreateWorkbook(byte[] buffer, CExcelVersion excelVersion = CExcelVersion.Version2007) { var workbook = CreateWorkbook(excelVersion); workbook.LoadFromStream(new MemoryStream(buffer)); return(workbook); }
public Workbook CreateWorkbook(string filename, CExcelVersion excelVersion = CExcelVersion.Version2007) { var workbook = CreateWorkbook(excelVersion); workbook.LoadFromFile(filename); return(workbook); }
public Workbook CreateWorkbook(Stream sm, CExcelVersion excelVersion = CExcelVersion.Version2007) { var workbook = CreateWorkbook(excelVersion); workbook.LoadFromStream(sm); return(workbook); }
public IWorkbook CreateWorkbook(byte[] buffer, CExcelVersion excelVersion = CExcelVersion.Version2007) { IWorkbook workbook = null; if (excelVersion == CExcelVersion.Version2003) { workbook = new HSSFWorkbook(new MemoryStream(buffer)); } else { workbook = new XSSFWorkbook(new MemoryStream(buffer)); } return(workbook); }
public IWorkbook CreateWorkbook(Stream sm, CExcelVersion excelVersion = CExcelVersion.Version2007) { IWorkbook workbook = null; if (excelVersion == CExcelVersion.Version2003) { workbook = new HSSFWorkbook(sm); } else { workbook = new XSSFWorkbook(sm); } return(workbook); }
public IWorkbook CreateWorkbook(string filename, CExcelVersion excelVersion = CExcelVersion.Version2007) { IWorkbook workbook = null; if (excelVersion == CExcelVersion.Version2003) { var fs = File.OpenRead(filename); workbook = new HSSFWorkbook(fs); } else { workbook = new XSSFWorkbook(filename); } return(workbook); }
public Workbook CreateWorkbook(CExcelVersion excelVersion = CExcelVersion.Version2007) { ExcelVersion version = ExcelVersion.Version2016; if (excelVersion == CExcelVersion.Version2003) { version = ExcelVersion.Version97to2003; } var workbook = new Workbook() { Version = version }; workbook.Worksheets.Clear(); return(workbook); }
public ExcelPackage CreateWorkbook(string filename, CExcelVersion excelVersion = CExcelVersion.Version2007) { return(new ExcelPackage(new FileInfo(filename))); }
public ExcelPackage CreateWorkbook(byte[] buffer, CExcelVersion excelVersion = CExcelVersion.Version2007) { return(new ExcelPackage(new MemoryStream(buffer))); }
public ExcelPackage CreateWorkbook(Stream sm, CExcelVersion excelVersion = CExcelVersion.Version2007) { // return(new ExcelPackage(sm)); }
public ExcelPackage CreateWorkbook(CExcelVersion excelVersion = CExcelVersion.Version2007) { return(new ExcelPackage()); }