public class Dv extends XLSRecord
Offset Name Size Contents
--------------------------------------------------------
0 dwDvFlags 4 Option flags (see below)
4 dTitlePrompt var Title of the prompt box (Unicode string, 16-bit string length)
var. dTitleError var. Title of the error box (Unicode string, 16-bit string length)
var. dTextPrompt var. Text of the prompt box (Unicode string, 16-bit string length)
var. dTextError var. Text of the error box (Unicode string, 16-bit string length)
var. sz1 2 Size of the formula data for first condition (sz1)
var. garbage 2 Not used
var. firstCond sz1 Formula data for first condition (RPN token array without size field)
var. sz2 2 Size of the formula data for second condition (sz2)
var. garbage 2 Not used
var. secondCond sz2 Formula data for second condition (RPN token array without size field)
var. cRangeList var. Cell range address list with all affected ranges
Option flags field:
Bit Mask Name Contents
--
3-0 0000000FH ValType Data type: 00H = Any value
01H = Integer values
02H = Decimal values
03H = User defined list
04H = Date
05H = Time
06H = Text length
07H = Formula
6-4 00000070H ErrStyle Error style: 00H = Stop
01H = Warning
02H = Info
7 00000080H fStrLookup 1 = In list type validity the string list is explicitly given in the formula
8 00000100H fAllowBlank 1 = Empty cells allowed
9 00000200H fSuppressCombo 1 = Suppress the drop down arrow in list type validity
18 00040000H fShowInputMsg 1 = Show prompt box if cell selected
19 00080000H fShowErrorMsg 1 = Show error box if invalid values entered
23-20 00F00000H typOperator Condition operator: 00H = Between
01H = Not between
02H = Equal
03H = Not equal
04H = Greater than
05H = Less than
06H = Greater or equal
07H = Less or equal
In list type validity it is possible to enter an explicit string list. This string list is stored as tStr token . The string
items are separated by zero characters. There is no zero character at the end of the string list.
Example for a string list with the 3 strings A, B, and C: A<00H>B<00H>C (contained in a tStr token, string
length is 5).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 |
|---|
Dv() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOoxmlRange(String range)
Add a range this Dv refers to.
|
void |
addRange(String range)
Add a range this Dv refers to.
|
String |
getErrorBoxText()
Return the text in the error box
|
String |
getErrorBoxTitle()
Return the title from the error box
|
byte |
getErrorStyle()
Return a byte representing the error style for this DV
These map to the static final ints ERROR_* from ValidationHandle
|
String |
getFirstCond()
Get the first condition of the validation as
a string representation
|
short |
getIMEMode()
Get the IME mode for this validation
|
String |
getOOXML()
generate the proper OOXML to define this Dv
|
String |
getPromptBoxText()
Return the text in the prompt box
|
String |
getPromptBoxTitle()
Return the title in the prompt box
|
protected static XLSRecord |
getPrototype(WorkBook bk)
Create a dv record & populate with prototype bytes
|
String[] |
getRanges()
Return the range of data this Dv refers to as a string array
Values are stored as absolute ($) references, but should be displayed
as relative
|
String |
getSecondCond()
Get the second condition of the validation as
a string representation
|
boolean |
getShowInputMsg()
Show prompt box if cell selected?
|
byte |
getTypeOperator()
Get the type operator of this validation as a byte.
|
byte |
getValType()
Get the validation type of this Dv as a byte
These bytes map to the VALUE_* static values in
ValidationHandle
|
void |
init()
Standard init method
|
boolean |
isAllowBlank()
Allow blank cells in the validation area?
|
boolean |
isCorrectDataType(Object value)
Determines if the value passed in is of the
correct data type
|
boolean |
isInRange(String celladdy)
Determines if the Dv contains the cell address passed in
|
boolean |
isShowErrorMsg()
Show error box if invalid values entered?
|
boolean |
isStrLookup()
In list type validity the string list is explicitly given in the formula
|
boolean |
isSuppressCombo()
Suppress the drop down arrow in list type validity
|
boolean |
isValid(Object value)
Determine if the value passed in is valid for
this validation
|
static Dv |
parseOOXML(org.xmlpull.v1.XmlPullParser xpp,
Boundsheet bs)
create a new Dv record based on OOXML input
|
void |
preStream()
update record.
|
void |
setAllowBlank(boolean allowBlank)
Allow blank cells in the validation area?
|
void |
setErrorBoxText(String textError)
Set the text for the error box
|
void |
setErrorBoxTitle(String textError)
Set the title for the error box
|
void |
setErrorStyle(byte errstyle)
Set the error style for this Dv record
These map to the static final ints ERROR_* from ValidationHandle
|
void |
setFirstCond(String firstCond)
Set the first condition of the validation utilizing
a string.
|
void |
setIMEMode(short mode)
set the IME mode for this validation
|
void |
setPromptBoxText(String text)
Set the text for the prompt box
|
void |
setPromptBoxTitle(String text)
Set the title for the prompt box
|
void |
setRange(String range)
Set the range this Dv refers to.
|
void |
setSecondCond(String secondCond)
Set the first condition of the validation utilizing
a string.
|
void |
setShowErrMsg(boolean showErrMsg)
set show error box if invalid values entered?
|
void |
setShowInputMsg(boolean showInputMsg)
Set show prompt box if cell selected?
*
|
void |
setStrLookup(boolean strLookup)
In list type validity the string list is explicitly given in the formula
|
void |
setSuppressCombo(boolean suppressCombo)
Suppress the drop down arrow in list type validity
|
void |
setTypeOperator(byte typOperator)
set the type operator of this validation as a byte.
|
void |
setValType(byte valtype)
Set the validation type of this Dv as a byte
These bytes map to the VALUE_* static values in
ValidationHandle
|
void |
updateGrbit()
Apply all the grbit fields into the current grbit int
|
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, 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, toHexDump, toStringpublic boolean isValid(Object value) throws ValidationException
value - ValidationExceptionpublic boolean isCorrectDataType(Object value)
protected static XLSRecord getPrototype(WorkBook bk)
public void init()
init in interface BiffRecinit in class XLSRecordXLSRecord.init()public void preStream()
preStream in interface BiffRecpreStream in class XLSRecordXLSRecord.preStream()public void updateGrbit()
public String[] getRanges()
public void setRange(String range)
range - public void addRange(String range)
range - public void addOoxmlRange(String range)
range - public String getErrorBoxText()
public void setErrorBoxText(String textError)
textError - public String getPromptBoxText()
public void setPromptBoxText(String text)
text - public void setErrorBoxTitle(String textError)
textError - public String getErrorBoxTitle()
public String getPromptBoxTitle()
public void setPromptBoxTitle(String text)
text - public byte getErrorStyle()
public void setErrorStyle(byte errstyle)
public boolean isAllowBlank()
public void setAllowBlank(boolean allowBlank)
public String getFirstCond()
public void setFirstCond(String firstCond)
public String getSecondCond()
public void setSecondCond(String secondCond)
public boolean isShowErrorMsg()
public void setShowErrMsg(boolean showErrMsg)
public boolean getShowInputMsg()
public void setShowInputMsg(boolean showInputMsg)
public boolean isStrLookup()
public void setStrLookup(boolean strLookup)
public boolean isSuppressCombo()
public short getIMEMode()
public void setIMEMode(short mode)
public void setSuppressCombo(boolean suppressCombo)
public byte getTypeOperator()
public void setTypeOperator(byte typOperator)
public byte getValType()
public void setValType(byte valtype)
public boolean isInRange(String celladdy)
range - public static Dv parseOOXML(org.xmlpull.v1.XmlPullParser xpp, Boundsheet bs)
public String getOOXML()
Copyright © 2002–2019 Starter Inc.. All rights reserved.