/** * Accessor for the CompoundFile. For this feature to return non-null * value, the propertySets feature in WorkbookSettings must be enabled * and the workbook must contain additional property sets. This * method is used during the workbook copy * * @return the base compound file if it contains additional data items * and property sets are enabled */ public CompoundFile getCompoundFile() { return excelFile.getCompoundFile(); }
/** * Constructs this string formula * * @param t the record * @param excelFile the excel file * @param fr the formatting record * @param es the external sheet * @param nt the workbook * @param si the sheet * @param dummy the overload indicator */ public SharedStringFormulaRecord(Record t, File excelFile, FormattingRecords fr, ExternalSheet es, WorkbookMethods nt, SheetImpl si, EmptyString dummy) { super(t, fr, es, nt, si, excelFile.getPos()); value = ""; }
/** * Sees if there are any more records to read * * @return TRUE if there are more records, FALSE otherwise */ public boolean hasNext() { return file.hasNext(); }
WorkbookSettings ws) super(t, fr, es, nt, si, excelFile.getPos()); int pos = excelFile.getPos(); int filepos = excelFile.getPos(); Record nextRecord = excelFile.next(); int count = 0; while (nextRecord.getType() != Type.STRING && count < 4) nextRecord = excelFile.next(); count++; nextRecord = excelFile.peek(); while (nextRecord.getType() == Type.CONTINUE) nextRecord = excelFile.next(); // move the pointer within the data byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek(); excelFile.setPos(filepos);
int pos = excelFile.getPos(); Record nextRecord = excelFile.next(); int count = 0; while (nextRecord.getType() != Type.STRING && count < 4) nextRecord = excelFile.next(); count++; nextRecord = excelFile.peek(); while (nextRecord.getType() == Type.CONTINUE) nextRecord = excelFile.next(); // move the pointer within the data byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek();
BOFRecord bof = new BOFRecord(excelFile.next()); workbookBof = bof; bofs++; r = excelFile.next(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) continueRecords.add(excelFile.next()); nextrec = excelFile.peek(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) r.addContinueRecord(excelFile.next()); nextrec = excelFile.peek(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) drawingGroup.add(excelFile.next()); nextrec = excelFile.peek(); if (excelFile.hasNext()) r = excelFile.next(); while (excelFile.hasNext() && r.getType() != Type.EOF)
public WriteAccess(java.io.File file) throws IOException, BiffException { WorkbookSettings ws = new WorkbookSettings(); FileInputStream fis = new FileInputStream(file); File f = new File(fis, ws); reader = new BiffRecordReader(f); display(ws); fis.close(); }
/** * Constructor * * @param offset the offset in the raw file * @param f the excel 97 biff file * @param d the data record */ Record(byte[] d, int offset, File f) { code = IntegerHelper.getInt(d[offset], d[offset + 1]); length = IntegerHelper.getInt(d[offset + 2], d[offset + 3]); file = f; file.skip(4); dataPos = f.getPos(); file.skip(length); type = Type.getType(code); }
/** * Initializes the charts byte data */ private void initialize() { data = file.read(startpos, endpos - startpos); initialized = true; }
/** * Gets the next record * * @return the next record */ public Record next() { record = file.next(); return record; }
/** * Closes this workbook, and frees makes any memory allocated available * for garbage collection */ public void close() { if (lastSheet != null) { lastSheet.clear(); } excelFile.clear(); if (!settings.getGCDisabled()) { System.gc(); } }
WorkbookSettings ws) super(t, fr, es, nt, si, excelFile.getPos()); int pos = excelFile.getPos(); int filepos = excelFile.getPos(); Record nextRecord = excelFile.next(); int count = 0; while (nextRecord.getType() != Type.STRING && count < 4) nextRecord = excelFile.next(); count++; nextRecord = excelFile.peek(); while (nextRecord.getType() == Type.CONTINUE) nextRecord = excelFile.next(); // move the pointer within the data byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek(); excelFile.setPos(filepos);
int pos = excelFile.getPos(); Record nextRecord = excelFile.next(); int count = 0; while (nextRecord.getType() != Type.STRING && count < 4) nextRecord = excelFile.next(); count++; nextRecord = excelFile.peek(); while (nextRecord.getType() == Type.CONTINUE) nextRecord = excelFile.next(); // move the pointer within the data byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek();
BOFRecord bof = new BOFRecord(excelFile.next()); workbookBof = bof; bofs++; r = excelFile.next(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) continueRecords.add(excelFile.next()); nextrec = excelFile.peek(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) r.addContinueRecord(excelFile.next()); nextrec = excelFile.peek(); Record nextrec = excelFile.peek(); while (nextrec.getType() == Type.CONTINUE) drawingGroup.add(excelFile.next()); nextrec = excelFile.peek(); if (excelFile.hasNext()) r = excelFile.next(); while (excelFile.hasNext() && r.getType() != Type.EOF)
public WriteAccess(java.io.File file) throws IOException, BiffException { WorkbookSettings ws = new WorkbookSettings(); FileInputStream fis = new FileInputStream(file); File f = new File(fis, ws); reader = new BiffRecordReader(f); display(ws); fis.close(); }
/** * Constructor * * @param offset the offset in the raw file * @param f the excel 97 biff file * @param d the data record */ Record(byte[] d, int offset, File f) { code = IntegerHelper.getInt(d[offset], d[offset + 1]); length = IntegerHelper.getInt(d[offset + 2], d[offset + 3]); file = f; file.skip(4); dataPos = f.getPos(); file.skip(length); type = Type.getType(code); }