public final class AutoFilter extends XLSRecord
offset name size contents
---
4 iEntry 2 Index of the active autofilter
6 grbit 2 Option flags
8 doper1 10 DOPER struct for the first filter condition
18 doper2 10 DOPER struct for the second filter condition
28 rgch var String storage for vtString DOPER
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 |
|---|
AutoFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate()
Evaluates this AutoFilter's condition for each cell in the indicated column
over all rows in the sheet; if the condition is not met, the row is set to hidden
NOTE: since there may be other conditions (other AutoFilters, for instance) setting the row to it's hidden state, this method will not set the row to unhidden if the condition passes. |
int |
getCol()
return the column number (0-based) that this AutoFilter references
|
String |
getOp()
get the operator associated with this AutoFilter
NOTE: this will return the operator in the first condition if this AutoFilter contains two conditions Use getOp2 to retrieve the second condition operator |
String |
getOp2()
get the operator associated with the second condtion of this AutoFilter, if any
NOTE: this will return the operator in the second condition if this AutoFilter contains two conditions |
static XLSRecord |
getPrototype()
creates a new AutoFilter record
|
Object |
getVal()
return the value of the first comparison of this AutoFilter, if any
|
Object |
getVal2()
returns the value of the second comparison of this AutoFilter, if any
|
void |
init()
initialize the AutoFilter record
|
boolean |
isFilterBlanks()
returns true if this AutoFitler is set to filter blank rows
|
boolean |
isFilterNonBlanks()
returns true if this AutoFitler is set to filter all non-blank rows
|
boolean |
isTop10()
returns true if this is a top-10-type AutoFilter
|
void |
preStream()
Update the record before streaming
|
void |
setCol(int col)
set the column number (0-based) that this AutoFilter references
|
void |
setFilterBlanks()
sets this AutoFilter to filter all blank rows
|
void |
setFilterNonBlanks()
sets this AutoFilter to filter all non-blank rows
|
void |
setTop10(int n,
boolean percent,
boolean top10)
sets this AutoFilter to be a Top-n type of filter
Top-n filters only show the Top n values or percent in the column n can be from 1-500, or 0 to turn off Top 10 filtering |
void |
setVal(Object val,
String op)
Sets the custom comparison of this AutoFilter via a String operator and an Object value
Only those records that meet the equation (column value) e.g show all rows where column value >= 2.99 |
void |
setVal2(Object val,
String op,
boolean AND)
Sets the custom comparison of the second condition of this AutoFilter via a String operator and an Object value
This method sets the second condition of a two-condition filter |
String |
toString()
return a string representation of this autofilter
|
void |
update()
commit all the flags, dopers, etc to the byte rec array
|
addContinue, clone, close, 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, 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 static XLSRecord getPrototype()
public void init()
public void update()
public void evaluate()
public String toString()
public void preStream()
preStream in interface BiffRecpreStream in class XLSRecordXLSRecord.preStream()public int getCol()
public void setCol(int col)
int - col - 0-based column numberpublic void setVal(Object val, String op)
Object value can be of type
String
Boolean
Error
a Number type object
String operator may be one of: "=", ">", ">=", "<>", "<", "<="
Object - val - value to setString - op - operatorsetVal2public void setVal2(Object val, String op, boolean AND)
Only those records that meet the equation:
Object value can be of type
String
String operator may be one of: "=", ">", ">=", "<>", "<", "<="
first condiition AND/OR (column value)
e.g show all rows where (column value) <= 1.99 AND (column value) >= 2.99
Boolean
Error
a Number type object
Object - val - value to setString - op - operatorboolean - AND - true if two conditions should be AND'ed, false if OR'dsetVal2public Object getVal()
getVal2public Object getVal2()
getValpublic String getOp()
getOp2public String getOp2()
getOppublic void setTop10(int n,
boolean percent,
boolean top10)
int - n - 0-500boolean - percent - true if show Top-n percent; false to show Top-n itemsboolean - top10 - true if show Top 10 (items or percent), false to show Bottom N (items or percent)public void setFilterBlanks()
public boolean isFilterBlanks()
public void setFilterNonBlanks()
public boolean isFilterNonBlanks()
public boolean isTop10()
Copyright © 2002–2019 Starter Inc.. All rights reserved.