I'm using EPP plus library on a old version (4.5.3.3). I'm limited to it and trying to remove datavalidation from a range of values on a datasheet but can't do it - and I kept having references to it:
foreach (var dataValiation in _package.Workbook.Worksheets[(int)DataRelationName.ImportData].DataValidations.ToList())
{
_package.Workbook.Worksheets[2].DataValidations.Remove(dataValiation);
}
Also try to use "clear" but doesn't do the trick:
var _p = _package.Workbook.Worksheets[2].Cells[5, 1, 1000, 1000];
_p.Clear();
Also, try this:
worksheet.DataValidations.RemoveAll(x => true)
I'm completely lost on this - plus, when debugging, the count for all of datavalidations are 0 (zero) - but then, when saving the excel it appears there.
Any help?
