/** * Constructor * * @param f the excel file * @param sst the shared string table * @param fr formatting records * @param sb the bof record which indicates the start of the sheet * @param wb the bof record which indicates the start of the sheet * @param nf the 1904 flag * @param wp the workbook which this sheet belongs to * @throws BiffException */ DefaultSheet( File f, SSTRecord sst, FormattingRecords fr, BOFRecord sb, BOFRecord wb, boolean nf, WorkbookParser wp) throws BiffException { excelFile = f; sharedStrings = sst; formattingRecords = fr; sheetBof = sb; workbookBof = wb; columnInfosArray = new ArrayList(); sharedFormulas = new ArrayList(); hyperlinks = new ArrayList(); rowProperties = new ArrayList(10); columnInfosInitialized = false; rowRecordsInitialized = false; nineteenFour = nf; workbook = wp; workbookSettings = workbook.getSettings(); // Mark the position in the stream, and then skip on until the end startPosition = f.getPos(); if (sheetBof.isChart()) { // Set the start pos to include the bof so the sheet reader can handle it startPosition -= (sheetBof.getLength() + 4); } Record r = null; int bofs = 1; while (bofs >= 1) { r = f.next(); // use this form for quick performance if (r.getCode() == Type.EOF.value) { bofs--; } if (r.getCode() == Type.BOF.value) { bofs++; } } }