error "Found EOFRecord before WindowTwoRecord was encountered"

Nov 20, 2009 at 8:41 AM


I want start example application on my web site on and I recive "Found EOFRecord before WindowTwoRecord was encountered" when I want add stream to the constructor


               string path = @"D:\Firma\Projekty\TPSA.Syringe\TPSA.Syringe\Files\test.xls";
                string path1 = @"D:\Firma\Projekty\TPSA.Syringe\TPSA.Syringe\Files\test2.xls";
                FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read);

                HSSFWorkbook hssfworkbook = new HSSFWorkbook(file); <- exception

                //create a entry of DocumentSummaryInformation
                DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
                dsi.Company = "NPOI Team";
                hssfworkbook.DocumentSummaryInformation = dsi;

                //create a entry of SummaryInformation
                SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
                si.Subject = "NPOI SDK Example";
                hssfworkbook.SummaryInformation = si;

                FileStream filetest = new FileStream(path1, FileMode.Create);

Nov 23, 2009 at 2:15 PM

There seems to be something wrong with your xls template file. Can you send me the files so that I can reproduce the issue on my computer?

Oct 22, 2010 at 1:51 PM

If you are still interested I can provide you with such files that trigger this exception.