Class CustomDataValidation


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

      • allowBlank

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

        public CustomDataValidation 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 CustomDataValidation
      • errorStyle

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

        public CustomDataValidation 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 CustomDataValidation
      • errorTitle

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

        public CustomDataValidation error​(String error)
        Message text of error alert.
        Parameters:
        error - The error message
        Returns:
        this CustomDataValidation
      • 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.