public final class Shrfmla extends XLSRecord
Occasionally Excel writes a FORMULA record with fShrFmla set whose expression is an instantiation of the relevant shared formula instead of the usual PtgExp. We currently handle these by clearing fShrFmla. At some point in the future we will attempt to detect which shared formula is applied and make the cell a member of its group.
OpenXLS does not currently create shared formulas or add cells to existing ones. Existing shared formulas will be preserved in output. Removal of formulas from the group is supported, including the cell currently hosting the SHRFMLA record. Shared formula member cells will be reference-tracked and recalculated properly.
OFFSET NAME SIZE CONTENTS 0 rwFirst 2 First Row 2 rwLast 2 Last Row 4 colFirst 1 First Column 5 colLast 1 Last Column 6 (reserved) 2 pass through, zero for new 8 cce 2 Length of the parsed expression 10 rgce cce Parsed Expression
col, continues, DEBUGLEVEL, hyperlink, idx, isBlank, isBoolean, isContinueMerged, isString, lastidx, myxf, offset, rw, streamer, wkbook, worksheetAI, ALLOWDUPES, ALRUNS, AREA, AREAFORMAT, ARRAY, ATTACHEDLABEL, AUTOFILTER, AXCENT, AXESUSED, AXIS, AXISLINEFORMAT, AXISPARENT, BACKUP, BAR, BEGIN, BLANK, BOF, BOOKBOOL, BOOLERR, BOPPOP, BOPPOPCUSTOM, BOTTOM_MARGIN, BOTTOMMARGIN, BOUNDSHEET, CALC_MODE_PROP, CALCCOUNT, CALCMODE, CALCULATE_ALWAYS, CALCULATE_AUTO, CALCULATE_EXPLICIT, CATLAB, CATSERRANGE, CF, CF12, CHART, CHART3DBARSHAPE, CHARTFORMAT, CHARTFORMATLINK, CHARTFRTINFO, CHARTLINE, CODENAME, COLINFO, CONDFMT, CONDFMT12, CONTINUE, COUNTRY, CRN, CRTLAYOUT12, CRTLAYOUT12A, DAT, DATAFORMAT, DATALABEXT, DATALABEXTCONTENTS, DATE1904, DBCELL, DCON, DCONBIN, DCONNAME, DCONREF, DEBUG_HIGH, DEBUG_LOW, DEBUG_MEDIUM, DEFAULTENCODING, DEFAULTROWHEIGHT, DEFAULTTEXT, DEFCOLWIDTH, DELTA, DIMENSIONS, DROPBAR, DSF, DV, DVAL, END, ENDBLOCK, ENDEXTSST, ENDOBJECT, EOF, EXCEL2K, EXTERNCOUNT, EXTERNNAME, EXTERNSHEET, EXTSST, FBI, FEATHEADR, FILE_LOCK, FILEPASS, FONT, FONTBASIS, FONTX, FOOTERREC, FORMAT, FORMULA, FRAME, FRTFONTLIST, FRTWRAPPER, GARBAGE, GELFRAME, GUTS, HCENTER, HEADERREC, HLINK, HORIZONTAL_PAGE_BREAKS, IFMT, INDEX, INTERFACE_HDR, ITERATION, LABEL, LABELSST, LEFT_MARGIN, LEFTMARGIN, LEGEND, LEGENDXN, LINE, LINEFORMAT, MARKERFORMAT, MAXCOLS, MAXCOLS_BIFF8, MAXRECLEN, MAXROWS, MAXROWS_BIFF8, MERGEDCELLS, MSODRAWING, MSODRAWINGGROUP, MSODRAWINGSELECTION, MULBLANK, MULRK, NAME, NOTE, NUMBER, OBJ, OBJECTLINK, OBJPROTECT, OBPROJ, PALETTE, PANE, PASSWORD, PHONETIC, PICF, PIE, PIEFORMAT, PIVOTCHARTBITS, PIVOTCHARTLINK, PLOTAREA, PLOTGROWTH, PLS, PLV, POS, PRECISION, PRINT_GRIDLINES, PRINT_ROW_HEADERS, PRINTGRID, PRINTROWCOL, PROT4REV, PROTECT, QSISXTAG, RADAR, RADARAREA, RANGEPROTECTION, REFMODE, REFTRACK_PROP, RIGHT_MARGIN, RIGHTMARGIN, RK, ROW, RRD_HEAD, RRD_INFO, RSTRING, RTENTEXU, RTMERGECELLS, SBASEREF, SCATTER, SCENPROTECT, SCL, SELECTION, SERAUXERRBAR, SERAUXTREND, SERFMT, SERIES, SERIESLIST, SERIESTEXT, SERPARENT, SERTOCRT, SETUP, SHAREDUPES, SHEETLAYOUT, SHEETPROTECTION, SHRFMLA, SHTPROPS, SIIINDEX, SST, STARTBLOCK, STARTOBJECT, STRING_ENCODING_AUTO, STRING_ENCODING_COMPRESSED, STRING_ENCODING_UNICODE, STRINGREC, STYLE, SUPBOOK, SURFACE, SXADDL, SXBOOL, SXDB, SXDBB, SXDBEX, SXDI, SXEX, SXFDB, SXFDBTYPE, SXFORMAT, SXIVD, SXLI, SXNUM, SXPI, SXSTREAMID, SXSTRING, SXVD, SXVDEX, SXVI, SXVIEW, SXVIEWEX9, SXVIEWLINK, SXVS, TABID, TABLE, TABLESTYLES, TEXTDISP, THREED, TICK, TOP_MARGIN, TOPMARGIN, TXO, TYPE_BLANK, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FORMULA, TYPE_FP, TYPE_INT, TYPE_STRING, UNICODEENCODING, UNITS, USERBVIEW, USERSVIEWBEGIN, USERSVIEWEND, USETEMPFILE_PROP, USR_EXCL, VALIDATEWORKBOOK, VALUERANGE, VB_MODULE, VCENTER, VERTICAL_PAGE_BREAKS, WINDOW_PROTECT, WINDOW1, WINDOW2, WK_CHART, WK_FILE, WK_GLOBALS, WK_MACROSHEET, WK_WORKSHEET, WSBOOL, XCT, XF, XLS_MAX_COLS, YMULT| Constructor and Description |
|---|
Shrfmla() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(Formula member)
Adds a member formula to this shared formula.
|
void |
close()
clear out object references in prep for closing workbook
|
static Stack |
convertStack(Stack in,
Formula f)
Converts an expression stack that uses relative PTGs to
a standard stack for calculation
|
protected void |
finalize() |
protected Formula |
getAffected(BiffRec br)
determine which formula in set of shared formula members is affected by cell br
|
String |
getCellRange()
Gets the area where references to this shared formula may occur.
|
int |
getFirstCol() |
int |
getFirstRow() |
Formula |
getHostCell()
Gets the formula record in which this record resides.
|
int |
getLastCol() |
int |
getLastRow() |
SortedSet |
getMembers()
return all the formulas that use this Shrfmla
|
PtgExp |
getPointer()
Gets a
PtgExp pointer to this ShrFmla. |
Stack |
getStack() |
void |
init()
perform record initialization
|
Stack |
instantiate(Formula parent)
convert expression using dimensions of specific member formula
|
void |
preStream()
do any pre-streaming processing such as expensive
index updates or other deferrable processing.
|
void |
removeMember(Formula member) |
protected void |
setContainsIndirectFunction(boolean containsIndirectFunction)
Set if the formula contains Indirect()
|
void |
setFirstRow(int row) |
void |
setHostCell(Formula newHost)
Sets the formula record in which this record resides.
|
void |
setLastRow(int row) |
String |
toString() |
void |
updateLocation(int shiftamount,
PtgRef pr)
update location upon a shift (row insertion or deletion)-- ensure member formulas cache are cleared
|
addContinue, clone, copyFormat, getBooleanVal, getByteAt, getByteReader, getBytes, getBytesAt, getCellAddress, getCellAddressWithSheet, getCellType, getColNumber, getColorTable, getContinueVect, getData, getDataType, getDblVal, getDefaultVal, getEncryptedByteReader, getFirstBlock, getFloatVal, getFont, getFormatPattern, getFormulaRec, getHyperlink, getInternalVal, getIntLocation, getIntVal, getIxfe, getLastBlock, getLength, getMergeRange, getOffset, getOpcode, getPrototype, getRealRecordIndex, getRecDesc, getRecordIndex, getRow, getRowNumber, getSheet, getStreamer, getStringVal, getStringVal, getWorkBook, getXfRec, hasContinues, initRowCol, isFormula, isNumber, isReadOnly, isValueForCell, mergeContinues, postStream, remove, removeContinues, resetCacheBytes, setBooleanVal, setByteReader, setCol, setData, setDebugLevel, setDoubleVal, setEncryptedByteReader, setFirstBlock, setFloatVal, setHyperlink, setIndex, setIntVal, setIsValueForCell, setIxfe, setLastBlock, setLength, setMergeRange, setOffset, setOpcode, setRow, setRowCol, setRowNumber, setSheet, setStreamer, setStringVal, setValueForCell, setWorkBook, setXFRecord, setXFRecord, shouldEncrypt, toHexDumppublic int getFirstRow()
public int getLastRow()
public int getFirstCol()
public int getLastCol()
public void updateLocation(int shiftamount,
PtgRef pr)
shiftamount - public void setFirstRow(int row)
public void setLastRow(int row)
public void init()
XLSRecordpublic void preStream()
XLSRecordpublic static Stack convertStack(Stack in, Formula f)
public String getCellRange()
public void setHostCell(Formula newHost)
public Formula getHostCell()
public PtgExp getPointer()
PtgExp pointer to this ShrFmla.
The returned PtgExp points to this record at its current
location. If the host cell or its address changes the pointer will
become invalid.public void addMember(Formula member)
IndexOutOfBoundsException - if there are already 255 memberspublic void removeMember(Formula member)
public SortedSet getMembers()
public Stack getStack()
public Stack instantiate(Formula parent)
parent - protected void setContainsIndirectFunction(boolean containsIndirectFunction)
containsIndirectFunction - The containsIndirectFunction to set.protected Formula getAffected(BiffRec br)
br - cellpublic void close()
XLSRecordCopyright © 2002–2019 Starter Inc.. All rights reserved.