text: 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;}