public virtual IWorkbookBase LoadNPoiStream(Stream fileXls, string fileName) { Format = DocFormat.Xls; Guard.Check(fileXls != null); Book = new NPoiWorkbook(); var npoiBook = Book as NPoiWorkbook; npoiBook.ReadStream(fileXls, fileName); return(Book); }
public virtual void LoadNPoi(string file) { Format = DocFormat.Xls; if (!File.Exists(file)) { throw new ArgumentException("File " + file + " error"); } Book = new NPoiWorkbook(); Book.Open(file); }