Class DVRecord
This record is part of the Data Validity Table. It stores data validity settings and a list of cell ranges which contain these settings. The "prompt box" appears while editing such a cell. The "error box" appears if the entered value does not fit the conditions. The data validity settings of a sheet are stored in a sequential list of DV records. This list is preluded by a DVAL record. If a string is empty and the default text should appear in the prompt box or error box, the string must contain a single zero character (string length will be 1).
Inheritance
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
[Biff]
public class DVRecord : BiffRecordRawWithArray, IBiffStorage, IDisposable, ICloneable
Constructors
DVRecord()
Default constructor
Declaration
public DVRecord()
DVRecord(Int32)
Reserved for record's internal data array.
Declaration
public DVRecord(int iReserve)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iReserve | Amount of bytes for data array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If amount of bytes requested is less than zero. |
DVRecord(Stream, out Int32)
Read / initialize constructor.
Declaration
public DVRecord(Stream stream, out int itemSize)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream from which record data should be read. |
System.Int32 | itemSize | Size of read item. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If stream is not specified. |
System.ApplicationException | If stream does not support read or seek operations. |
Fields
ConditionBitMask
Bit mask for condition.
Declaration
public const uint ConditionBitMask = 15728640U
Field Value
Type |
---|
System.UInt32 |
ConditionStartBit
Start bit of the condition in options.
Declaration
public const int ConditionStartBit = 20
Field Value
Type |
---|
System.Int32 |
DataTypeBitMask
Bit mask for data type.
Declaration
public const uint DataTypeBitMask = 15U
Field Value
Type |
---|
System.UInt32 |
ErrorStyleBitMask
Bit mask for error style.
Declaration
public const uint ErrorStyleBitMask = 112U
Field Value
Type |
---|
System.UInt32 |
ErrorStyleStartBit
Start bit of the error style in options.
Declaration
public const int ErrorStyleStartBit = 4
Field Value
Type |
---|
System.Int32 |
StringEmpty
Declaration
public const string StringEmpty = "\0"
Field Value
Type |
---|
System.String |
Properties
AddrList
Cell range address list with all the affected ranges.
Declaration
public TAddr[] AddrList { get; set; }
Property Value
Type |
---|
TAddr[] |
AddrListSize
Read-only. Number of cell range addresses.
Declaration
public ushort AddrListSize { get; }
Property Value
Type |
---|
System.UInt16 |
Condition
Condition operator: Changes bits of m_uiOptions private member.
Declaration
public ExcelDataValidationComparisonOperator Condition { get; set; }
Property Value
Type |
---|
ExcelDataValidationComparisonOperator |
DataType
Data type: Changes bits of m_uiOptions private member.
Declaration
public ExcelDataType DataType { get; set; }
Property Value
Type |
---|
ExcelDataType |
ErrorBoxText
Text of the error box (Unicode string, 16-bit string length).
Declaration
public string ErrorBoxText { get; set; }
Property Value
Type |
---|
System.String |
ErrorBoxTitle
Title of the error box (Unicode string, 16-bit string length).
Declaration
public string ErrorBoxTitle { get; set; }
Property Value
Type |
---|
System.String |
ErrorStyle
Error style: Changes bits of m_uiOptions private member.
Declaration
public ExcelErrorStyle ErrorStyle { get; set; }
Property Value
Type |
---|
ExcelErrorStyle |
FirstFormulaTokens
Formula data for the first condition (RPN token array without size field).
Declaration
public Ptg[] FirstFormulaTokens { get; set; }
Property Value
Type |
---|
Ptg[] |
IsEmptyCell
True if empty cells are allowed.
Declaration
public bool IsEmptyCell { get; set; }
Property Value
Type |
---|
System.Boolean |
IsShowErrorBox
True to show error box if invalid values are entered.
Declaration
public bool IsShowErrorBox { get; set; }
Property Value
Type |
---|
System.Boolean |
IsShowPromptBox
True to show prompt box if cell is selected.
Declaration
public bool IsShowPromptBox { get; set; }
Property Value
Type |
---|
System.Boolean |
IsStrListExplicit
True if in list type validity, the string list is explicitly given in the formula.
Declaration
public bool IsStrListExplicit { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSuppressArrow
True to suppress the drop-down arrow in list type validity.
Declaration
public bool IsSuppressArrow { get; set; }
Property Value
Type |
---|
System.Boolean |
MinimumRecordSize
Read-only. Minimum possible size of the record.
Declaration
public override int MinimumRecordSize { get; }
Property Value
Type |
---|
System.Int32 |
Overrides
Options
Option flags.
Declaration
public uint Options { get; }
Property Value
Type |
---|
System.UInt32 |
PromtBoxText
Text of the prompt box (Unicode string, 16-bit string length).
Declaration
public string PromtBoxText { get; set; }
Property Value
Type |
---|
System.String |
PromtBoxTitle
Title of the prompt box (Unicode string, 16-bit string length).
Declaration
public string PromtBoxTitle { get; set; }
Property Value
Type |
---|
System.String |
SecondFormulaTokens
Formula data for the second condition (RPN token array without size field).
Declaration
public Ptg[] SecondFormulaTokens { get; set; }
Property Value
Type |
---|
Ptg[] |
Methods
Add(TAddr)
Adds new range to the list of validation ranges.
Declaration
public void Add(TAddr addrToAdd)
Parameters
Type | Name | Description |
---|---|---|
TAddr | addrToAdd | Range to add. |
AddRange(TAddr[])
Adds new ranges to the list of validation ranges.
Declaration
public void AddRange(TAddr[] addrToAdd)
Parameters
Type | Name | Description |
---|---|---|
TAddr[] | addrToAdd | Array of ranges to add. |
AddRange(ICollection<TAddr>)
Adds new ranges to the list of validation ranges.
Declaration
public void AddRange(ICollection<TAddr> addrToAdd)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<TAddr> | addrToAdd | Collection of ranges to add. |
ClearAddressList()
Clears the Address.
Declaration
public void ClearAddressList()
Clone()
Clone current record.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | Returns clone of the current object. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type |
---|
System.Boolean |
GetFormulaSize(Ptg[], ExcelVersion, Boolean)
Evaluates size of the formula in bytes.
Declaration
public static int GetFormulaSize(Ptg[] arrTokens, ExcelVersion version, bool addAdditionalDataSize)
Parameters
Type | Name | Description |
---|---|---|
Ptg[] | arrTokens | Tokens to get size from. |
ExcelVersion | version | Excel version that should be used to infill data. |
System.Boolean | addAdditionalDataSize | Indicates whether we should add size of the additional data. |
Returns
Type | Description |
---|---|
System.Int32 | Formula size in bytes. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
---|
System.Int32 |
GetStoreSize(ExcelVersion)
Size of the required storage space. Read-only.
Declaration
public override int GetStoreSize(ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
ExcelVersion | version |
Returns
Type |
---|
System.Int32 |
Overrides
ParseStructure()
Parse structure of record. Converts data buffer to special values according to record specification.
Declaration
public override void ParseStructure()
Overrides
Exceptions
Type | Condition |
---|---|
WrongBiffRecordDataException | When last byte of read data is not the last byte of data after parsing. |