Skip to content

Instantly share code, notes, and snippets.

@Qleoz12
Created July 23, 2019 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qleoz12/e1fd954da68057e986ff5eff8566c4b9 to your computer and use it in GitHub Desktop.
Save Qleoz12/e1fd954da68057e986ff5eff8566c4b9 to your computer and use it in GitHub Desktop.
/**
* 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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment