public class ExternSheetRecord extends StandardRecord
Modifier and Type | Field | Description |
---|---|---|
static short |
sid |
Constructor | Description |
---|---|
ExternSheetRecord() |
|
ExternSheetRecord(RecordInputStream in) |
Modifier and Type | Method | Description |
---|---|---|
int |
addRef(int extBookIndex,
int firstSheetIndex,
int lastSheetIndex) |
Add a zero-based reference to a
SupBookRecord . |
void |
addREFRecord(org.apache.poi.hssf.record.ExternSheetRecord.RefSubRecord rec) |
adds REF struct (ExternSheetSubRecord)
|
void |
adjustIndex(int extRefIndex,
int offset) |
Deprecated.
Was prevously used for removing sheets, which we now do differently
|
static ExternSheetRecord |
combine(ExternSheetRecord[] esrs) |
|
int |
findRefIndexFromExtBookIndex(int extBookIndex) |
|
protected int |
getDataSize() |
|
int |
getExtbookIndexFromRefIndex(int refIndex) |
Returns the index of the SupBookRecord for this index
|
int |
getFirstSheetIndexFromRefIndex(int extRefIndex) |
Returns the first sheet that the reference applies to, or
-1 if the referenced sheet can't be found, or -2 if the
reference is workbook scoped.
|
int |
getLastSheetIndexFromRefIndex(int extRefIndex) |
Returns the last sheet that the reference applies to, or
-1 if the referenced sheet can't be found, or -2 if the
reference is workbook scoped.
|
int |
getNumOfREFRecords() |
returns the number of REF Records, which is in model
|
int |
getNumOfRefs() |
|
int |
getRefIxForSheet(int externalBookIndex,
int firstSheetIndex,
int lastSheetIndex) |
|
short |
getSid() |
return the non static version of the id for this record.
|
void |
removeSheet(int sheetIdx) |
|
void |
serialize(LittleEndianOutput out) |
Write the data content of this BIFF record.
|
java.lang.String |
toString() |
get a string representation of the record (for biffview/debugging)
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, cloneViaReserialise, serialize
getRecordSize, serialize
public static final short sid
public ExternSheetRecord()
public ExternSheetRecord(RecordInputStream in)
public int getNumOfRefs()
public void addREFRecord(org.apache.poi.hssf.record.ExternSheetRecord.RefSubRecord rec)
rec
- REF structpublic int getNumOfREFRecords()
public java.lang.String toString()
Record
protected int getDataSize()
getDataSize
in class StandardRecord
public void serialize(LittleEndianOutput out)
StandardRecord
RecordBase.getRecordSize()
} minus four
( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written
by thye superclass).serialize
in class StandardRecord
@Deprecated public void adjustIndex(int extRefIndex, int offset)
public void removeSheet(int sheetIdx)
public short getSid()
public int getExtbookIndexFromRefIndex(int refIndex)
public int findRefIndexFromExtBookIndex(int extBookIndex)
public int getFirstSheetIndexFromRefIndex(int extRefIndex)
public int getLastSheetIndexFromRefIndex(int extRefIndex)
public int addRef(int extBookIndex, int firstSheetIndex, int lastSheetIndex)
SupBookRecord
.
If the type of the SupBook record is same-sheet referencing, Add-In referencing, DDE data source referencing, or OLE data source referencing, then no scope is specified and this value MUST be -2. Otherwise, the scope must be set as follows:
-2
Workbook-level reference that applies to the entire workbook.-1
Sheet-level reference. >=0
Sheet-level reference. This specifies the first sheet in the reference.
If the SupBook type is unused or external workbook referencing,
then this value specifies the zero-based index of an external sheet name,
see SupBookRecord.getSheetNames()
.
This referenced string specifies the name of the first sheet within the external workbook that is in scope.
This sheet MUST be a worksheet or macro sheet.
If the supporting link type is self-referencing, then this value specifies the zero-based index of a
BoundSheetRecord
record in the workbook stream that specifies
the first sheet within the scope of this reference. This sheet MUST be a worksheet or a macro sheet.
firstSheetIndex
- the scope, must be -2 for add-in referenceslastSheetIndex
- the scope, must be -2 for add-in referencespublic int getRefIxForSheet(int externalBookIndex, int firstSheetIndex, int lastSheetIndex)
public static ExternSheetRecord combine(ExternSheetRecord[] esrs)
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.