IXlsDataValidation
COM interface ( getting help with interfaces )

 

interface IXlsDataValidation : IDispatch
{

  [id(1)         ] HRESULT AddItem([in]BSTR label);
  [id(2)         ] HRESULT AddItemSource([in]BSTR range);
  [id(3), propput] HRESULT IgnoreErrorIfEmpty([in]BOOL bIgnoreErrorIfEmpty);
  [id(4), propput] HRESULT ShowDropDown([in]BOOL bShowDropDown);
  [id(5), propput] HRESULT ShowInformation([in]BOOL bShowInformation);
  [id(6), propput] HRESULT InformationMessageTitle([in]BSTR informationtitle);
  [id(7), propput] HRESULT InformationMessageBody([in]BSTR informationbody);
  [id(8), propput] HRESULT ShowError([in]BOOL bShowError);
  [id(9), propput] HRESULT ErrorMessageTitle([in]BSTR errortitle);
  [id(10),propput] HRESULT ErrorMessageBody([in]BSTR errorbody);
  [id(11),propput] HRESULT ErrorMessageType([in]enumValidationErrorType type);
  [id(12),propput] HRESULT ValidationType([in]enumValidationType type);
  [id(13),propget] HRESULT ValidationCondition([out, retval]IXlsCellCondition** cc);
  [id(14),propget] HRESULT ValidationFormula([out, retval]IXlsFormulaCondition** fc);
  [id(15),propget] HRESULT Areas([out,retval]BSTR* cellrange);
  [id(16)        ] HRESULT Delete();

}

 

HRESULT AddItem([in]BSTR label);
adds an item in the pick list.

HRESULT AddItemSource([in]BSTR range);
adds an item source range to the pick list.

HRESULT IgnoreErrorIfEmpty([in]BOOL bIgnoreErrorIfEmpty);
sets whether or not the error message should be avoided if the cell remains empty. Default value is true.

HRESULT ShowDropDown([in]BOOL bShowDropDown);
sets whether or not the drop down list of values should show. Default value is true.

HRESULT ShowInformation([in]BOOL bShowInformation);
sets whether or not the information message should show. Default value is true.

HRESULT InformationMessageTitle([in]BSTR informationtitle);
sets the information title meant to explain the meaning of the values to select from.

HRESULT InformationMessageBody([in]BSTR informationbody);
sets the information body meant to explain the meaning of the values to select from.

HRESULT ShowError([in]BOOL bShowError);
sets whether or not the error message should show. Default value is true.

HRESULT ErrorMessageTitle([in]BSTR errortitle);
sets the error title meant to explain the error.

HRESULT ErrorMessageBody([in]BSTR errorbody);
sets the error body meant to explain the error.

HRESULT ErrorMessageType([in]enumValidationErrorType type);
sets the error type. Default is stop.

HRESULT ValidationType([in]enumValidationType type);
sets the validation type. Default is the pick-list.

HRESULT ValidationCondition([out, retval]IXlsCellCondition** cc);
creates a validation condition. Applies to all validation types, except the Pick-list and the custom formula.

HRESULT ValidationFormula([out, retval]IXlsFormulaCondition** fc);
creates a custom formula-based validation condition.

HRESULT Areas([out,retval]BSTR* cellrange);
returns the areas where the data validation rules apply. The returned range is semi-colon separated, of the form RxCxx:RyCyy.

HRESULT Delete();
delete the data validation rules.