Search in sources :

Example 6 with BoundSheetRecord

use of org.apache.poi.hssf.record.BoundSheetRecord in project poi by apache.

the class InternalWorkbook method createWorkbook.

/**
     * read support  for low level
     * API.  Pass in an array of Record objects, A Workbook
     * object is constructed and passed back with all of its initialization set
     * to the passed in records and references to those records held. Unlike Sheet
     * workbook does not use an offset (its assumed to be 0) since its first in a file.
     * If you need an offset then construct a new array with a 0 offset or write your
     * own ;-p.
     *
     * @param recs an array of Record objects
     * @return Workbook object
     */
public static InternalWorkbook createWorkbook(List<Record> recs) {
    LOG.log(DEBUG, "Workbook (readfile) created with reclen=", recs.size());
    InternalWorkbook retval = new InternalWorkbook();
    List<Record> records = new ArrayList<Record>(recs.size() / 3);
    retval.records.setRecords(records);
    boolean eofPassed = false;
    for (int k = 0; k < recs.size(); k++) {
        Record rec = recs.get(k);
        String logObj;
        switch(rec.getSid()) {
            case EOFRecord.sid:
                logObj = "workbook eof";
                break;
            case BoundSheetRecord.sid:
                logObj = "boundsheet";
                retval.boundsheets.add((BoundSheetRecord) rec);
                retval.records.setBspos(k);
                break;
            case SSTRecord.sid:
                logObj = "sst";
                retval.sst = (SSTRecord) rec;
                break;
            case FontRecord.sid:
                logObj = "font";
                retval.records.setFontpos(k);
                retval.numfonts++;
                break;
            case ExtendedFormatRecord.sid:
                logObj = "XF";
                retval.records.setXfpos(k);
                retval.numxfs++;
                break;
            case TabIdRecord.sid:
                logObj = "tabid";
                retval.records.setTabpos(k);
                break;
            case ProtectRecord.sid:
                logObj = "protect";
                retval.records.setProtpos(k);
                break;
            case BackupRecord.sid:
                logObj = "backup";
                retval.records.setBackuppos(k);
                break;
            case ExternSheetRecord.sid:
                throw new RecordFormatException("Extern sheet is part of LinkTable");
            case NameRecord.sid:
            case SupBookRecord.sid:
                // LinkTable can start with either of these
                LOG.log(DEBUG, "found SupBook record at " + k);
                retval.linkTable = new LinkTable(recs, k, retval.records, retval.commentRecords);
                k += retval.linkTable.getRecordCount() - 1;
                continue;
            case FormatRecord.sid:
                logObj = "format";
                FormatRecord fr = (FormatRecord) rec;
                retval.formats.add(fr);
                retval.maxformatid = retval.maxformatid >= fr.getIndexCode() ? retval.maxformatid : fr.getIndexCode();
                break;
            case DateWindow1904Record.sid:
                logObj = "datewindow1904";
                retval.uses1904datewindowing = ((DateWindow1904Record) rec).getWindowing() == 1;
                break;
            case PaletteRecord.sid:
                logObj = "palette";
                retval.records.setPalettepos(k);
                break;
            case WindowOneRecord.sid:
                logObj = "WindowOneRecord";
                retval.windowOne = (WindowOneRecord) rec;
                break;
            case WriteAccessRecord.sid:
                logObj = "WriteAccess";
                retval.writeAccess = (WriteAccessRecord) rec;
                break;
            case WriteProtectRecord.sid:
                logObj = "WriteProtect";
                retval.writeProtect = (WriteProtectRecord) rec;
                break;
            case FileSharingRecord.sid:
                logObj = "FileSharing";
                retval.fileShare = (FileSharingRecord) rec;
                break;
            case NameCommentRecord.sid:
                logObj = "NameComment";
                final NameCommentRecord ncr = (NameCommentRecord) rec;
                retval.commentRecords.put(ncr.getNameText(), ncr);
                break;
            case HyperlinkRecord.sid:
                // Look for other interesting values that follow the EOFRecord
                logObj = "Hyperlink";
                retval.hyperlinks.add((HyperlinkRecord) rec);
                break;
            default:
                logObj = "(sid=" + rec.getSid() + ")";
                break;
        }
        if (!eofPassed) {
            records.add(rec);
        }
        LOG.log(DEBUG, "found " + logObj + " record at " + k);
        if (rec.getSid() == EOFRecord.sid) {
            eofPassed = true;
        }
    }
    if (retval.windowOne == null) {
        retval.windowOne = createWindowOne();
    }
    LOG.log(DEBUG, "exit create workbook from existing file function");
    return retval;
}
Also used : RecordFormatException(org.apache.poi.util.RecordFormatException) ArrayList(java.util.ArrayList) WindowProtectRecord(org.apache.poi.hssf.record.WindowProtectRecord) PasswordRev4Record(org.apache.poi.hssf.record.PasswordRev4Record) DateWindow1904Record(org.apache.poi.hssf.record.DateWindow1904Record) FormatRecord(org.apache.poi.hssf.record.FormatRecord) BookBoolRecord(org.apache.poi.hssf.record.BookBoolRecord) StyleRecord(org.apache.poi.hssf.record.StyleRecord) RecalcIdRecord(org.apache.poi.hssf.record.RecalcIdRecord) EscherBSERecord(org.apache.poi.ddf.EscherBSERecord) EscherOptRecord(org.apache.poi.ddf.EscherOptRecord) HideObjRecord(org.apache.poi.hssf.record.HideObjRecord) Record(org.apache.poi.hssf.record.Record) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) HyperlinkRecord(org.apache.poi.hssf.record.HyperlinkRecord) ProtectionRev4Record(org.apache.poi.hssf.record.ProtectionRev4Record) EOFRecord(org.apache.poi.hssf.record.EOFRecord) MMSRecord(org.apache.poi.hssf.record.MMSRecord) PrecisionRecord(org.apache.poi.hssf.record.PrecisionRecord) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord) CountryRecord(org.apache.poi.hssf.record.CountryRecord) EscherSpRecord(org.apache.poi.ddf.EscherSpRecord) NameCommentRecord(org.apache.poi.hssf.record.NameCommentRecord) FnGroupCountRecord(org.apache.poi.hssf.record.FnGroupCountRecord) DrawingGroupRecord(org.apache.poi.hssf.record.DrawingGroupRecord) BackupRecord(org.apache.poi.hssf.record.BackupRecord) EscherSplitMenuColorsRecord(org.apache.poi.ddf.EscherSplitMenuColorsRecord) ExternSheetRecord(org.apache.poi.hssf.record.ExternSheetRecord) WriteAccessRecord(org.apache.poi.hssf.record.WriteAccessRecord) EscherDggRecord(org.apache.poi.ddf.EscherDggRecord) CodepageRecord(org.apache.poi.hssf.record.CodepageRecord) EscherRecord(org.apache.poi.ddf.EscherRecord) NameRecord(org.apache.poi.hssf.record.NameRecord) BOFRecord(org.apache.poi.hssf.record.BOFRecord) FilePassRecord(org.apache.poi.hssf.record.FilePassRecord) FontRecord(org.apache.poi.hssf.record.FontRecord) UseSelFSRecord(org.apache.poi.hssf.record.UseSelFSRecord) WindowOneRecord(org.apache.poi.hssf.record.WindowOneRecord) WriteProtectRecord(org.apache.poi.hssf.record.WriteProtectRecord) ProtectRecord(org.apache.poi.hssf.record.ProtectRecord) InterfaceHdrRecord(org.apache.poi.hssf.record.InterfaceHdrRecord) DSFRecord(org.apache.poi.hssf.record.DSFRecord) InterfaceEndRecord(org.apache.poi.hssf.record.InterfaceEndRecord) SupBookRecord(org.apache.poi.hssf.record.SupBookRecord) SSTRecord(org.apache.poi.hssf.record.SSTRecord) TabIdRecord(org.apache.poi.hssf.record.TabIdRecord) PasswordRecord(org.apache.poi.hssf.record.PasswordRecord) PaletteRecord(org.apache.poi.hssf.record.PaletteRecord) EscherDgRecord(org.apache.poi.ddf.EscherDgRecord) ExtSSTRecord(org.apache.poi.hssf.record.ExtSSTRecord) ExtendedFormatRecord(org.apache.poi.hssf.record.ExtendedFormatRecord) FileSharingRecord(org.apache.poi.hssf.record.FileSharingRecord) RefreshAllRecord(org.apache.poi.hssf.record.RefreshAllRecord) UnicodeString(org.apache.poi.hssf.record.common.UnicodeString) DateWindow1904Record(org.apache.poi.hssf.record.DateWindow1904Record) FormatRecord(org.apache.poi.hssf.record.FormatRecord) ExtendedFormatRecord(org.apache.poi.hssf.record.ExtendedFormatRecord) NameCommentRecord(org.apache.poi.hssf.record.NameCommentRecord)

Example 7 with BoundSheetRecord

use of org.apache.poi.hssf.record.BoundSheetRecord in project poi by apache.

the class InternalWorkbook method createWorkbook.

/**
     * Creates an empty workbook object with three blank sheets and all the empty
     * fields.  Use this to create a workbook from scratch.
     *
     * @return an empty workbook object
     */
public static InternalWorkbook createWorkbook() {
    LOG.log(DEBUG, "creating new workbook from scratch");
    InternalWorkbook retval = new InternalWorkbook();
    List<Record> records = new ArrayList<Record>(30);
    retval.records.setRecords(records);
    List<FormatRecord> formats = retval.formats;
    records.add(createBOF());
    records.add(new InterfaceHdrRecord(CODEPAGE));
    records.add(createMMS());
    records.add(InterfaceEndRecord.instance);
    records.add(createWriteAccess());
    records.add(createCodepage());
    records.add(createDSF());
    records.add(createTabId());
    retval.records.setTabpos(records.size() - 1);
    records.add(createFnGroupCount());
    records.add(createWindowProtect());
    records.add(createProtect());
    retval.records.setProtpos(records.size() - 1);
    records.add(createPassword());
    records.add(createProtectionRev4());
    records.add(createPasswordRev4());
    retval.windowOne = createWindowOne();
    records.add(retval.windowOne);
    records.add(createBackup());
    retval.records.setBackuppos(records.size() - 1);
    records.add(createHideObj());
    records.add(createDateWindow1904());
    records.add(createPrecision());
    records.add(createRefreshAll());
    records.add(createBookBool());
    records.add(createFont());
    records.add(createFont());
    records.add(createFont());
    records.add(createFont());
    // last font record position
    retval.records.setFontpos(records.size() - 1);
    retval.numfonts = 4;
    // set up format records
    for (int i = 0; i <= 7; i++) {
        FormatRecord rec = createFormat(i);
        retval.maxformatid = retval.maxformatid >= rec.getIndexCode() ? retval.maxformatid : rec.getIndexCode();
        formats.add(rec);
        records.add(rec);
    }
    for (int k = 0; k < 21; k++) {
        records.add(InternalWorkbook.createExtendedFormat(k));
        retval.numxfs++;
    }
    retval.records.setXfpos(records.size() - 1);
    for (int k = 0; k < 6; k++) {
        records.add(InternalWorkbook.createStyle(k));
    }
    records.add(InternalWorkbook.createUseSelFS());
    // now just do 1
    int nBoundSheets = 1;
    for (int k = 0; k < nBoundSheets; k++) {
        BoundSheetRecord bsr = createBoundSheet(k);
        records.add(bsr);
        retval.boundsheets.add(bsr);
        retval.records.setBspos(records.size() - 1);
    }
    records.add(InternalWorkbook.createCountry());
    for (int k = 0; k < nBoundSheets; k++) {
        retval.getOrCreateLinkTable().checkExternSheet(k);
    }
    retval.sst = new SSTRecord();
    records.add(retval.sst);
    records.add(InternalWorkbook.createExtendedSST());
    records.add(EOFRecord.instance);
    LOG.log(DEBUG, "exit create new workbook from scratch");
    return retval;
}
Also used : InterfaceHdrRecord(org.apache.poi.hssf.record.InterfaceHdrRecord) ArrayList(java.util.ArrayList) WindowProtectRecord(org.apache.poi.hssf.record.WindowProtectRecord) PasswordRev4Record(org.apache.poi.hssf.record.PasswordRev4Record) DateWindow1904Record(org.apache.poi.hssf.record.DateWindow1904Record) FormatRecord(org.apache.poi.hssf.record.FormatRecord) BookBoolRecord(org.apache.poi.hssf.record.BookBoolRecord) StyleRecord(org.apache.poi.hssf.record.StyleRecord) RecalcIdRecord(org.apache.poi.hssf.record.RecalcIdRecord) EscherBSERecord(org.apache.poi.ddf.EscherBSERecord) EscherOptRecord(org.apache.poi.ddf.EscherOptRecord) HideObjRecord(org.apache.poi.hssf.record.HideObjRecord) Record(org.apache.poi.hssf.record.Record) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) HyperlinkRecord(org.apache.poi.hssf.record.HyperlinkRecord) ProtectionRev4Record(org.apache.poi.hssf.record.ProtectionRev4Record) EOFRecord(org.apache.poi.hssf.record.EOFRecord) MMSRecord(org.apache.poi.hssf.record.MMSRecord) PrecisionRecord(org.apache.poi.hssf.record.PrecisionRecord) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord) CountryRecord(org.apache.poi.hssf.record.CountryRecord) EscherSpRecord(org.apache.poi.ddf.EscherSpRecord) NameCommentRecord(org.apache.poi.hssf.record.NameCommentRecord) FnGroupCountRecord(org.apache.poi.hssf.record.FnGroupCountRecord) DrawingGroupRecord(org.apache.poi.hssf.record.DrawingGroupRecord) BackupRecord(org.apache.poi.hssf.record.BackupRecord) EscherSplitMenuColorsRecord(org.apache.poi.ddf.EscherSplitMenuColorsRecord) ExternSheetRecord(org.apache.poi.hssf.record.ExternSheetRecord) WriteAccessRecord(org.apache.poi.hssf.record.WriteAccessRecord) EscherDggRecord(org.apache.poi.ddf.EscherDggRecord) CodepageRecord(org.apache.poi.hssf.record.CodepageRecord) EscherRecord(org.apache.poi.ddf.EscherRecord) NameRecord(org.apache.poi.hssf.record.NameRecord) BOFRecord(org.apache.poi.hssf.record.BOFRecord) FilePassRecord(org.apache.poi.hssf.record.FilePassRecord) FontRecord(org.apache.poi.hssf.record.FontRecord) UseSelFSRecord(org.apache.poi.hssf.record.UseSelFSRecord) WindowOneRecord(org.apache.poi.hssf.record.WindowOneRecord) WriteProtectRecord(org.apache.poi.hssf.record.WriteProtectRecord) ProtectRecord(org.apache.poi.hssf.record.ProtectRecord) InterfaceHdrRecord(org.apache.poi.hssf.record.InterfaceHdrRecord) DSFRecord(org.apache.poi.hssf.record.DSFRecord) InterfaceEndRecord(org.apache.poi.hssf.record.InterfaceEndRecord) SupBookRecord(org.apache.poi.hssf.record.SupBookRecord) SSTRecord(org.apache.poi.hssf.record.SSTRecord) TabIdRecord(org.apache.poi.hssf.record.TabIdRecord) PasswordRecord(org.apache.poi.hssf.record.PasswordRecord) PaletteRecord(org.apache.poi.hssf.record.PaletteRecord) EscherDgRecord(org.apache.poi.ddf.EscherDgRecord) ExtSSTRecord(org.apache.poi.hssf.record.ExtSSTRecord) ExtendedFormatRecord(org.apache.poi.hssf.record.ExtendedFormatRecord) FileSharingRecord(org.apache.poi.hssf.record.FileSharingRecord) RefreshAllRecord(org.apache.poi.hssf.record.RefreshAllRecord) FormatRecord(org.apache.poi.hssf.record.FormatRecord) ExtendedFormatRecord(org.apache.poi.hssf.record.ExtendedFormatRecord) SSTRecord(org.apache.poi.hssf.record.SSTRecord) ExtSSTRecord(org.apache.poi.hssf.record.ExtSSTRecord) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord)

Example 8 with BoundSheetRecord

use of org.apache.poi.hssf.record.BoundSheetRecord in project poi by apache.

the class InternalWorkbook method serialize.

/**
     * Serializes all records int the worksheet section into a big byte array. Use
     * this to write the Workbook out.
     * @param offset of the data to be written
     * @param data array of bytes to write this to
     * @return the length of serialized bytes
     */
public int serialize(int offset, byte[] data) {
    LOG.log(DEBUG, "Serializing Workbook with offsets");
    int pos = 0;
    SSTRecord lSST = null;
    int sstPos = 0;
    boolean wroteBoundSheets = false;
    for (Record record : records) {
        int len = 0;
        if (record instanceof SSTRecord) {
            lSST = (SSTRecord) record;
            sstPos = pos;
        }
        if (record.getSid() == ExtSSTRecord.sid && lSST != null) {
            record = lSST.createExtSSTRecord(sstPos + offset);
        }
        if (record instanceof BoundSheetRecord) {
            if (!wroteBoundSheets) {
                for (BoundSheetRecord bsr : boundsheets) {
                    len += bsr.serialize(pos + offset + len, data);
                }
                wroteBoundSheets = true;
            }
        } else {
            len = record.serialize(pos + offset, data);
        }
        pos += len;
    }
    LOG.log(DEBUG, "Exiting serialize workbook");
    return pos;
}
Also used : WindowProtectRecord(org.apache.poi.hssf.record.WindowProtectRecord) PasswordRev4Record(org.apache.poi.hssf.record.PasswordRev4Record) DateWindow1904Record(org.apache.poi.hssf.record.DateWindow1904Record) FormatRecord(org.apache.poi.hssf.record.FormatRecord) BookBoolRecord(org.apache.poi.hssf.record.BookBoolRecord) StyleRecord(org.apache.poi.hssf.record.StyleRecord) RecalcIdRecord(org.apache.poi.hssf.record.RecalcIdRecord) EscherBSERecord(org.apache.poi.ddf.EscherBSERecord) EscherOptRecord(org.apache.poi.ddf.EscherOptRecord) HideObjRecord(org.apache.poi.hssf.record.HideObjRecord) Record(org.apache.poi.hssf.record.Record) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) HyperlinkRecord(org.apache.poi.hssf.record.HyperlinkRecord) ProtectionRev4Record(org.apache.poi.hssf.record.ProtectionRev4Record) EOFRecord(org.apache.poi.hssf.record.EOFRecord) MMSRecord(org.apache.poi.hssf.record.MMSRecord) PrecisionRecord(org.apache.poi.hssf.record.PrecisionRecord) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord) CountryRecord(org.apache.poi.hssf.record.CountryRecord) EscherSpRecord(org.apache.poi.ddf.EscherSpRecord) NameCommentRecord(org.apache.poi.hssf.record.NameCommentRecord) FnGroupCountRecord(org.apache.poi.hssf.record.FnGroupCountRecord) DrawingGroupRecord(org.apache.poi.hssf.record.DrawingGroupRecord) BackupRecord(org.apache.poi.hssf.record.BackupRecord) EscherSplitMenuColorsRecord(org.apache.poi.ddf.EscherSplitMenuColorsRecord) ExternSheetRecord(org.apache.poi.hssf.record.ExternSheetRecord) WriteAccessRecord(org.apache.poi.hssf.record.WriteAccessRecord) EscherDggRecord(org.apache.poi.ddf.EscherDggRecord) CodepageRecord(org.apache.poi.hssf.record.CodepageRecord) EscherRecord(org.apache.poi.ddf.EscherRecord) NameRecord(org.apache.poi.hssf.record.NameRecord) BOFRecord(org.apache.poi.hssf.record.BOFRecord) FilePassRecord(org.apache.poi.hssf.record.FilePassRecord) FontRecord(org.apache.poi.hssf.record.FontRecord) UseSelFSRecord(org.apache.poi.hssf.record.UseSelFSRecord) WindowOneRecord(org.apache.poi.hssf.record.WindowOneRecord) WriteProtectRecord(org.apache.poi.hssf.record.WriteProtectRecord) ProtectRecord(org.apache.poi.hssf.record.ProtectRecord) InterfaceHdrRecord(org.apache.poi.hssf.record.InterfaceHdrRecord) DSFRecord(org.apache.poi.hssf.record.DSFRecord) InterfaceEndRecord(org.apache.poi.hssf.record.InterfaceEndRecord) SupBookRecord(org.apache.poi.hssf.record.SupBookRecord) SSTRecord(org.apache.poi.hssf.record.SSTRecord) TabIdRecord(org.apache.poi.hssf.record.TabIdRecord) PasswordRecord(org.apache.poi.hssf.record.PasswordRecord) PaletteRecord(org.apache.poi.hssf.record.PaletteRecord) EscherDgRecord(org.apache.poi.ddf.EscherDgRecord) ExtSSTRecord(org.apache.poi.hssf.record.ExtSSTRecord) ExtendedFormatRecord(org.apache.poi.hssf.record.ExtendedFormatRecord) FileSharingRecord(org.apache.poi.hssf.record.FileSharingRecord) RefreshAllRecord(org.apache.poi.hssf.record.RefreshAllRecord) SSTRecord(org.apache.poi.hssf.record.SSTRecord) ExtSSTRecord(org.apache.poi.hssf.record.ExtSSTRecord) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord)

Example 9 with BoundSheetRecord

use of org.apache.poi.hssf.record.BoundSheetRecord in project poi by apache.

the class InternalWorkbook method doesContainsSheetName.

/**
     * Determines whether a workbook contains the provided sheet name.  For the purpose of
     * comparison, long names are truncated to 31 chars.
     *
     * @param name the name to test (case insensitive match)
     * @param excludeSheetIdx the sheet to exclude from the check or -1 to include all sheets in the check.
     * @return true if the sheet contains the name, false otherwise.
     */
public boolean doesContainsSheetName(String name, int excludeSheetIdx) {
    String aName = name;
    if (aName.length() > MAX_SENSITIVE_SHEET_NAME_LEN) {
        aName = aName.substring(0, MAX_SENSITIVE_SHEET_NAME_LEN);
    }
    int i = 0;
    for (BoundSheetRecord boundSheetRecord : boundsheets) {
        if (excludeSheetIdx == i++) {
            continue;
        }
        String bName = boundSheetRecord.getSheetname();
        if (bName.length() > MAX_SENSITIVE_SHEET_NAME_LEN) {
            bName = bName.substring(0, MAX_SENSITIVE_SHEET_NAME_LEN);
        }
        if (aName.equalsIgnoreCase(bName)) {
            return true;
        }
    }
    return false;
}
Also used : UnicodeString(org.apache.poi.hssf.record.common.UnicodeString) BoundSheetRecord(org.apache.poi.hssf.record.BoundSheetRecord)

Aggregations

BoundSheetRecord (org.apache.poi.hssf.record.BoundSheetRecord)9 EOFRecord (org.apache.poi.hssf.record.EOFRecord)5 ExternSheetRecord (org.apache.poi.hssf.record.ExternSheetRecord)4 EscherBSERecord (org.apache.poi.ddf.EscherBSERecord)3 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)3 EscherDgRecord (org.apache.poi.ddf.EscherDgRecord)3 EscherDggRecord (org.apache.poi.ddf.EscherDggRecord)3 EscherOptRecord (org.apache.poi.ddf.EscherOptRecord)3 EscherRecord (org.apache.poi.ddf.EscherRecord)3 EscherSpRecord (org.apache.poi.ddf.EscherSpRecord)3 EscherSplitMenuColorsRecord (org.apache.poi.ddf.EscherSplitMenuColorsRecord)3 BOFRecord (org.apache.poi.hssf.record.BOFRecord)3 BackupRecord (org.apache.poi.hssf.record.BackupRecord)3 BookBoolRecord (org.apache.poi.hssf.record.BookBoolRecord)3 CodepageRecord (org.apache.poi.hssf.record.CodepageRecord)3 CountryRecord (org.apache.poi.hssf.record.CountryRecord)3 DSFRecord (org.apache.poi.hssf.record.DSFRecord)3 DateWindow1904Record (org.apache.poi.hssf.record.DateWindow1904Record)3 DrawingGroupRecord (org.apache.poi.hssf.record.DrawingGroupRecord)3 ExtSSTRecord (org.apache.poi.hssf.record.ExtSSTRecord)3