text: public String resolveNameXText(int refIndex, int definedNameIndex, InternalWorkbook workbook) {int extBookIndex = _externSheetRecord.getExtbookIndexFromRefIndex(refIndex);int firstTabIndex = _externSheetRecord.getFirstSheetIndexFromRefIndex(refIndex);if (firstTabIndex == -1) {throw new RuntimeException("Referenced sheet could not be found");}ExternalBookBlock externalBook = _externalBookBlocks[extBookIndex];if (externalBook._externalNameRecords.length > definedNameIndex) {return _externalBookBlocks[extBookIndex].getNameText(definedNameIndex);} else if (firstTabIndex == -2) {NameRecord nr = getNameRecord(definedNameIndex);int sheetNumber = nr.getSheetNumber();StringBuilder text = new StringBuilder(64);if (sheetNumber > 0) {String sheetName = workbook.getSheetName(sheetNumber - 1);SheetNameFormatter.appendFormat(text, sheetName);text.append("!");}text.append(nr.getNameText());return text.toString();} else {throw new ArrayIndexOutOfBoundsException("Ext Book Index relative but beyond the supported length, was " +extBookIndex + " but maximum is " + _externalBookBlocks.length);}}