includes/org/apache/poi/hssf/model/InternalWorkbook.java
public static InternalWorkbook createWorkbook(List<Record> recs) {
        if (log.check( POILogger.DEBUG ))
            log.log(DEBUG, "Workbook (readfile) created with reclen=",
                    Integer.valueOf(recs.size()));
        InternalWorkbook retval = new InternalWorkbook();
        List<Record> records = new ArrayList<>(recs.size() / 3);
        retval.records.setRecords(records);

        int k;
        for (k = 0; k < recs.size(); k++) {
            Record rec = recs.get(k);

            if (rec.getSid() == EOFRecord.sid) {
                records.add(rec);
                if (log.check( POILogger.DEBUG ))
                    log.log(DEBUG, "found workbook eof record at " + k);
                break;
            }
            switch (rec.getSid()) {

                case BoundSheetRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found boundsheet record at " + k);
                    retval.boundsheets.add((BoundSheetRecord) rec);
                    retval.records.setBspos( k );
                    break;

                case SSTRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found sst record at " + k);
                    retval.sst = ( SSTRecord ) rec;
                    break;

                case ExtendedFormatRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found XF record at " + k);
                    retval.records.setXfpos( k );
                    retval.numxfs++;
                    break;

                case TabIdRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found tabid record at " + k);
                    retval.records.setTabpos( k );
                    break;

                case ExternSheetRecord.sid :
                    throw new RuntimeException("Extern sheet is part of LinkTable");
                case NameRecord.sid :
                case SupBookRecord.sid :
                    // LinkTable can start with either of these
                    if (log.check( POILogger.DEBUG ))
                        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 :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found format record at " + k);
                    retval.formats.add((FormatRecord) rec);
                    retval.maxformatid = retval.maxformatid >= ((FormatRecord)rec).getIndexCode() ? retval.maxformatid : ((FormatRecord)rec).getIndexCode();
                    break;
                case DateWindow1904Record.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found datewindow1904 record at " + k);
                    retval.uses1904datewindowing = ((DateWindow1904Record)rec).getWindowing() == 1;
                    break;
                case WindowOneRecord.sid:
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found WindowOneRecord at " + k);
                    retval.windowOne = (WindowOneRecord) rec;
                    break;
                case NameCommentRecord.sid:
                    final NameCommentRecord ncr = (NameCommentRecord) rec;
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found NameComment at " + k);
                    retval.commentRecords.put(ncr.getNameText(), ncr);
                default :
            }
            records.add(rec);
        }
        //What if we dont have any ranges and supbooks
        //        if (retval.records.supbookpos == 0) {
        //            retval.records.supbookpos = retval.records.bspos + 1;
        //            retval.records.namepos    = retval.records.supbookpos + 1;
        //        }

        // Look for other interesting values that
        //  follow the EOFRecord
        for ( ; k < recs.size(); k++) {
            Record rec = recs.get(k);
            switch (rec.getSid()) {
                case HyperlinkRecord.sid:
                    retval.hyperlinks.add((HyperlinkRecord)rec);
                    break;
            }
        }

        if (retval.windowOne == null) {
            retval.windowOne = createWindowOne();
        }
        if (log.check( POILogger.DEBUG ))
            log.log(DEBUG, "exit create workbook from existing file function");
        return retval;
    }
/**
     * 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
     */
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
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) {
        if (log.check( POILogger.DEBUG ))
            log.log(DEBUG, "Workbook (readfile) created with reclen=",
                    Integer.valueOf(recs.size()));
        InternalWorkbook retval = new InternalWorkbook();
        List<Record> records = new ArrayList<>(recs.size() / 3);
        retval.records.setRecords(records);
        int k;
        for (k = 0; k < recs.size(); k++) {
            Record rec = recs.get(k);
            if (rec.getSid() == EOFRecord.sid) {
                records.add(rec);
                if (log.check( POILogger.DEBUG ))
                    log.log(DEBUG, "found workbook eof record at " + k);
                break;
            }
            switch (rec.getSid()) {
                case BoundSheetRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found boundsheet record at " + k);
                    retval.boundsheets.add((BoundSheetRecord) rec);
                    retval.records.setBspos( k );
                    break;
                case SSTRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found sst record at " + k);
                    retval.sst = ( SSTRecord ) rec;
                    break;
                case ExtendedFormatRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found XF record at " + k);
                    retval.records.setXfpos( k );
                    retval.numxfs++;
                    break;
                case TabIdRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found tabid record at " + k);
                    retval.records.setTabpos( k );
                    break;
                case ExternSheetRecord.sid :
                    throw new RuntimeException("Extern sheet is part of LinkTable");
                case NameRecord.sid :
                case SupBookRecord.sid :
                    if (log.check( POILogger.DEBUG ))
                        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 :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found format record at " + k);
                    retval.formats.add((FormatRecord) rec);
                    retval.maxformatid = retval.maxformatid >= ((FormatRecord)rec).getIndexCode() ? retval.maxformatid : ((FormatRecord)rec).getIndexCode();
                    break;
                case DateWindow1904Record.sid :
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found datewindow1904 record at " + k);
                    retval.uses1904datewindowing = ((DateWindow1904Record)rec).getWindowing() == 1;
                    break;
                case WindowOneRecord.sid:
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found WindowOneRecord at " + k);
                    retval.windowOne = (WindowOneRecord) rec;
                    break;
                case NameCommentRecord.sid:
                    final NameCommentRecord ncr = (NameCommentRecord) rec;
                    if (log.check( POILogger.DEBUG ))
                        log.log(DEBUG, "found NameComment at " + k);
                    retval.commentRecords.put(ncr.getNameText(), ncr);
                default :
            }
            records.add(rec);
        }
        for ( ; k < recs.size(); k++) {
            Record rec = recs.get(k);
            switch (rec.getSid()) {
                case HyperlinkRecord.sid:
                    retval.hyperlinks.add((HyperlinkRecord)rec);
                    break;
            }
        }
        if (retval.windowOne == null) {
            retval.windowOne = createWindowOne();
        }
        if (log.check( POILogger.DEBUG ))
            log.log(DEBUG, "exit create workbook from existing file function");
        return retval;
    }
public static InternalWorkbook createWorkbook ( List < Record > recs ) { if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "Workbook (readfile) created with reclen=" , Integer . valueOf ( recs . size ( ) ) ) ; InternalWorkbook retval = new InternalWorkbook ( ) ; List < Record > records = new ArrayList < > ( recs . size ( ) / 3 ) ; retval . records . setRecords ( records ) ; int k ; for ( k = 0 ; k < recs . size ( ) ; k ++ ) { Record rec = recs . get ( k ) ; if ( rec . getSid ( ) == EOFRecord . sid ) { records . add ( rec ) ; if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found workbook eof record at " + k ) ; break ; } switch ( rec . getSid ( ) ) { case BoundSheetRecord . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found boundsheet record at " + k ) ; retval . boundsheets . add ( ( BoundSheetRecord ) rec ) ; retval . records . setBspos ( k ) ; break ; case SSTRecord . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found sst record at " + k ) ; retval . sst = ( SSTRecord ) rec ; break ; case ExtendedFormatRecord . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found XF record at " + k ) ; retval . records . setXfpos ( k ) ; retval . numxfs ++ ; break ; case TabIdRecord . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found tabid record at " + k ) ; retval . records . setTabpos ( k ) ; break ; case ExternSheetRecord . sid : throw new RuntimeException ( "Extern sheet is part of LinkTable" ) ; case NameRecord . sid : case SupBookRecord . sid : if ( log . check ( POILogger . DEBUG ) ) 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 : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found format record at " + k ) ; retval . formats . add ( ( FormatRecord ) rec ) ; retval . maxformatid = retval . maxformatid >= ( ( FormatRecord ) rec ) . getIndexCode ( ) ? retval . maxformatid : ( ( FormatRecord ) rec ) . getIndexCode ( ) ; break ; case DateWindow1904Record . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found datewindow1904 record at " + k ) ; retval . uses1904datewindowing = ( ( DateWindow1904Record ) rec ) . getWindowing ( ) == 1 ; break ; case WindowOneRecord . sid : if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found WindowOneRecord at " + k ) ; retval . windowOne = ( WindowOneRecord ) rec ; break ; case NameCommentRecord . sid : final NameCommentRecord ncr = ( NameCommentRecord ) rec ; if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "found NameComment at " + k ) ; retval . commentRecords . put ( ncr . getNameText ( ) , ncr ) ; default : } records . add ( rec ) ; } for ( ; k < recs . size ( ) ; k ++ ) { Record rec = recs . get ( k ) ; switch ( rec . getSid ( ) ) { case HyperlinkRecord . sid : retval . hyperlinks . add ( ( HyperlinkRecord ) rec ) ; break ; } } if ( retval . windowOne == null ) { retval . windowOne = createWindowOne ( ) ; } if ( log . check ( POILogger . DEBUG ) ) log . log ( DEBUG , "exit create workbook from existing file function" ) ; return retval ; }
read support  for low level
 API.
read support for low level API .
// LinkTable can start with either of these
 //What if we dont have any ranges and supbooks
 //        if (retval.records.supbookpos == 0) {
 //            retval.records.supbookpos = retval.records.bspos + 1;
 //            retval.records.namepos    = retval.records.supbookpos + 1;
 //        }
 // Look for other interesting values that
 //  follow the EOFRecord
