text: public ExternalSheet GetExternalSheet(int externSheetIndex){ExternalSheet sheet = _iBook.GetExternalSheet(externSheetIndex);if (sheet == null){int localSheetIndex = ConvertFromExternSheetIndex(externSheetIndex);if (localSheetIndex == -1){return null;}if (localSheetIndex == -2){return null;}String sheetName = GetSheetName(localSheetIndex);int lastLocalSheetIndex = _iBook.GetLastSheetIndexFromExternSheetIndex(externSheetIndex);if (lastLocalSheetIndex == localSheetIndex){sheet = new ExternalSheet(null, sheetName);}else{String lastSheetName = GetSheetName(lastLocalSheetIndex);sheet = new ExternalSheetRange(null, sheetName, lastSheetName);}}return sheet;}