text: public int checkExternSheet(int firstSheetIndex, int lastSheetIndex) {int thisWbIndex = -1; for (int i = 0; i < _externalBookBlocks.length; i++) {SupBookRecord ebr = _externalBookBlocks[i].getExternalBookRecord();if (ebr.isInternalReferences()) {thisWbIndex = i;break;}}if (thisWbIndex < 0) {throw new RuntimeException("Could not find 'internal references' EXTERNALBOOK");}int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, firstSheetIndex, lastSheetIndex);if (i >= 0) {return i;}return _externSheetRecord.addRef(thisWbIndex, firstSheetIndex, lastSheetIndex);}