public int getExternalSheetIndex(String workbookName, String firstSheetName, String lastSheetName) {int externalBookIndex = getExternalWorkbookIndex(workbookName);if (externalBookIndex == -1) {throw new RuntimeException("No external workbook with name '" + workbookName + "'");}SupBookRecord ebrTarget = _externalBookBlocks[externalBookIndex].getExternalBookRecord();int firstSheetIndex = getSheetIndex(ebrTarget.getSheetNames(), firstSheetName);int lastSheetIndex = getSheetIndex(ebrTarget.getSheetNames(), lastSheetName);int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, firstSheetIndex, lastSheetIndex);if (result < 0) {result = _externSheetRecord.addRef(externalBookIndex, firstSheetIndex, lastSheetIndex);}return result;}

public int GetExternalSheetIndex(String workbookName, String firstSheetName, String lastSheetName){int externalBookIndex = GetExternalWorkbookIndex(workbookName);if (externalBookIndex == -1){throw new RuntimeException("No external workbook with name '" + workbookName + "'");}SupBookRecord ebrTarget = _externalBookBlocks[externalBookIndex].GetExternalBookRecord();int firstSheetIndex = GetSheetIndex(ebrTarget.SheetNames, firstSheetName);int lastSheetIndex = GetSheetIndex(ebrTarget.SheetNames, lastSheetName);int result = _externSheetRecord.GetRefIxForSheet(externalBookIndex, firstSheetIndex, lastSheetIndex);if (result < 0){result = _externSheetRecord.AddRef(externalBookIndex, firstSheetIndex, lastSheetIndex);}return result;}
