public static BookWrapper LoadExcel(sbyte[] sfile) { byte[] file = new byte[sfile.Length]; Buffer.BlockCopy(sfile, 0, file, 0, sfile.Length); MemoryStream ms = new MemoryStream(file); HSSFWorkbook book = new HSSFWorkbook(ms); BookWrapper wrapper = new BookWrapper(book); return(wrapper); }
public static BookWrapper CreateExcel() { HSSFWorkbook book = new HSSFWorkbook(); BookWrapper wrapper = new BookWrapper(book); ////create a entry of DocumentSummaryInformation DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation(); dsi.Company = "NPOI Team"; book.DocumentSummaryInformation = dsi; ////create a entry of SummaryInformation SummaryInformation si = PropertySetFactory.CreateSummaryInformation(); si.Subject = "NPOI SDK Example"; book.SummaryInformation = si; return(wrapper); }
public SheetWrapper(BookWrapper parent, HSSFSheet sheet) { _sheet = sheet; _parent = parent; }
public SheetWrapperEnumerator(BookWrapper book) { _book = book; _internalEnumerator = book._book.GetEnumerator(); }