Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public SheetWrapper(BookWrapper parent, HSSFSheet sheet)
 {
     _sheet  = sheet;
     _parent = parent;
 }
Esempio n. 4
0
 public SheetWrapperEnumerator(BookWrapper book)
 {
     _book = book;
     _internalEnumerator = book._book.GetEnumerator();
 }