You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by alefevre <al...@soprabanking.com> on 2014/03/18 18:15:28 UTC

XSSFWorkbook - Remove Explicit List Constraint on cell

Hi everybody,

After some research on internet i don't found answer to my question so you
are my last chance. 

On my project, I modify existing xlsm file (XSSFWorkbook). During my process
I need to delete some data constraint but I don't find how to do this. 

More information about characteristic of these constraints:
My constraints are based on list of value, show and error box in case of
wrong value and show the value lists.


I take all information or tips which permit to solve my issue. 


Thanks a lot,
Alexandre Lefevre



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSFWorkbook-Remove-Explicit-List-Constraint-on-cell-tp5715220.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


Re: XSSFWorkbook - Remove Explicit List Constraint on cell

Posted by alefevre <al...@soprabanking.com>.
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