public int checkExternSheet(int firstSheetIndex, int lastSheetIndex) { int thisWbIndex = -1; // this is probably always zero 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"); } //Trying to find reference to this sheet int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, firstSheetIndex, lastSheetIndex); if (i >= 0) { return i; } //We haven't found reference to this sheet return _externSheetRecord.addRef(thisWbIndex, firstSheetIndex, lastSheetIndex); }
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); // Find or add the external sheet record definition for this int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, firstSheetIndex, lastSheetIndex); if (result < 0) { result = _externSheetRecord.addRef(externalBookIndex, firstSheetIndex, lastSheetIndex); } return result; }
int ix = _externSheetRecord.getRefIxForSheet(extBlockIndex, fakeSheetIdx, fakeSheetIdx); return new NameXPtg(ix, nameIndex);
public int checkExternSheet(int firstSheetIndex, int lastSheetIndex) { int thisWbIndex = -1; // this is probably always zero 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"); } //Trying to find reference to this sheet int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, firstSheetIndex, lastSheetIndex); if (i >= 0) { return i; } //We haven't found reference to this sheet return _externSheetRecord.addRef(thisWbIndex, firstSheetIndex, lastSheetIndex); }
public int checkExternSheet(int sheetIndex) { int thisWbIndex = -1; // this is probably always zero 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"); } //Trying to find reference to this sheet int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, sheetIndex); if (i>=0) { return i; } //We haven't found reference to this sheet return _externSheetRecord.addRef(thisWbIndex, sheetIndex, sheetIndex); }
public int checkExternSheet(int sheetIndex) { int thisWbIndex = -1; // this is probably always zero 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"); } //Trying to find reference to this sheet int i = _externSheetRecord.getRefIxForSheet(thisWbIndex, sheetIndex); if (i>=0) { return i; } //We haven't found reference to this sheet return _externSheetRecord.addRef(thisWbIndex, sheetIndex, sheetIndex); }
public int getExternalSheetIndex(String workbookName, String sheetName) { SupBookRecord ebrTarget = null; int externalBookIndex = -1; for (int i=0; i<_externalBookBlocks.length; i++) { SupBookRecord ebr = _externalBookBlocks[i].getExternalBookRecord(); if (!ebr.isExternalReferences()) { continue; } if (workbookName.equals(ebr.getURL())) { // not sure if 'equals()' works when url has a directory ebrTarget = ebr; externalBookIndex = i; break; } } if (ebrTarget == null) { throw new RuntimeException("No external workbook with name '" + workbookName + "'"); } int sheetIndex = getSheetIndex(ebrTarget.getSheetNames(), sheetName); int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, sheetIndex); if (result < 0) { throw new RuntimeException("ExternSheetRecord does not contain combination (" + externalBookIndex + ", " + sheetIndex + ")"); } return result; }
public int getExternalSheetIndex(String workbookName, String sheetName) { SupBookRecord ebrTarget = null; int externalBookIndex = -1; for (int i=0; i<_externalBookBlocks.length; i++) { SupBookRecord ebr = _externalBookBlocks[i].getExternalBookRecord(); if (!ebr.isExternalReferences()) { continue; } if (workbookName.equals(ebr.getURL())) { // not sure if 'equals()' works when url has a directory ebrTarget = ebr; externalBookIndex = i; break; } } if (ebrTarget == null) { throw new RuntimeException("No external workbook with name '" + workbookName + "'"); } int sheetIndex = getSheetIndex(ebrTarget.getSheetNames(), sheetName); int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, sheetIndex); if (result < 0) { throw new RuntimeException("ExternSheetRecord does not contain combination (" + externalBookIndex + ", " + sheetIndex + ")"); } 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.getSheetNames(), firstSheetName); int lastSheetIndex = getSheetIndex(ebrTarget.getSheetNames(), lastSheetName); // Find or add the external sheet record definition for this int result = _externSheetRecord.getRefIxForSheet(externalBookIndex, firstSheetIndex, lastSheetIndex); if (result < 0) { result = _externSheetRecord.addRef(externalBookIndex, firstSheetIndex, lastSheetIndex); } return result; }
int ix = _externSheetRecord.getRefIxForSheet(extBlockIndex, -2 /* the scope is workbook*/); return new NameXPtg(ix, nameIndex);
int ix = _externSheetRecord.getRefIxForSheet(extBlockIndex, -2 /* the scope is workbook*/); return new NameXPtg(ix, nameIndex);
int ix = _externSheetRecord.getRefIxForSheet(extBlockIndex, fakeSheetIdx, fakeSheetIdx); return new NameXPtg(ix, nameIndex);