Class ListDataValidation


  • public class ListDataValidation
    extends Object
    A ListDataValidation defines a DataValidation for a worksheet of type = "list"
    • Method Detail

      • allowBlank

        public ListDataValidation allowBlank​(boolean allowBlank)
        whether blank cells should pass the validation
        Parameters:
        allowBlank - whether or not to allow blank values
        Returns:
        this ListDataValidation
      • showDropdown

        public ListDataValidation showDropdown​(boolean showDropdown)
        Whether Excel will show an in-cell dropdown list containing the validation list
        Parameters:
        showDropdown - whether or not to show the dropdown
        Returns:
        this ListDataValidation
      • errorStyle

        public ListDataValidation errorStyle​(DataValidationErrorStyle errorStyle)
        The style of error alert used for this data validation.
        Parameters:
        errorStyle - The DataValidationErrorStyle for this DataValidation
        Returns:
        this ListDataValidation
      • showErrorMessage

        public ListDataValidation showErrorMessage​(boolean showErrorMessage)
        Whether to display the error alert message when an invalid value has been entered.
        Parameters:
        showErrorMessage - whether to display the error message
        Returns:
        this ListDataValidation
      • errorTitle

        public ListDataValidation errorTitle​(String errorTitle)
        Title bar text of error alert.
        Parameters:
        errorTitle - The error title
        Returns:
        this ListDataValidation
      • error

        public ListDataValidation error​(String error)
        Message text of error alert.
        Parameters:
        error - The error message
        Returns:
        this ListDataValidation
      • write

        public void write​(org.dhatim.fastexcel.Writer w)
                   throws IOException
        Write this dataValidation as an XML element.
        Parameters:
        w - Output writer.
        Throws:
        IOException - If an I/O error occurs.