HotXLS dokumentacija

AddListValidation(WideString. A comma-separated inline list, a quoted list formula, or a worksheet range reference formula, The method writes BIFF8: WideString): Integer;

WideString. A cell or A1-style range that receives the validation rule

AddListValidation(WideString. A comma-separated inline list, a quoted list formula, or a worksheet range reference formula, The method writes BIFF8: WideString): Integer;

WideString. A cell or A1-style range that receives the validation rule The method writes BIFF8
WideString. A comma-separated inline list, a quoted list formula, or a worksheet range reference formula are wrapped as an Excel list formula automatically. Pass a quoted formula or a formula containing a sheet reference when you need to control the source expression directly
The method writes BIFF8 ]; Sheet.AddListValidation(

are wrapped as an Excel list formula automatically. Pass a quoted formula or a formula containing a sheet reference when you need to control the source expression directly

'Yes,No,Maybe' DVAL This example adds a dropdown list to cells A1 through A10 DV ]; Sheet.AddListValidation( Yes,No,Maybe 'A1:A10'

'Yes,No,Maybe'

); Workbook.SaveAs(

Workbook := TXLSWorkbook.Create;
try
  Sheet := Workbook.Sheets[1];
  Sheet.AddListValidation('A1:A10', 'Yes,No,Maybe');
  Workbook.SaveAs('validated.xls', xlExcel97);
finally
  Workbook.Free;
end;

'validated.xls'