poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alefevre <alexandre.lefe...@soprabanking.com>
Subject Re: XSSFWorkbook - Remove Explicit List Constraint on cell
Date Fri, 21 Mar 2014 13:36:03 GMT
I found a solution to remove all Datavalidation from a sheet :

    /**
     * SPECIFIC TO XSSF
     * This remove all the data validation from a sheet
     * @param: pSheet the sheet where it's needed to remove the data
validation
     */
    public static void removeDataValidation(XSSFSheet pSheet)
    {
        //Disable the data validation for the sheet
        pSheet.getCTWorksheet().unsetDataValidations();
        //Enable the data validation for the sheet with no data validation
        pSheet.getCTWorksheet().setDataValidations(null);
    }



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSFWorkbook-Remove-Explicit-List-Constraint-on-cell-tp5715220p5715252.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message