Add List Validation to Column except the first two rows
I am trying to add a dropdown (list validation) upon creating the excel, I already found the way to add it to whole column but my scenario is different because I only add the validation to whole column except the first row and second row. This is what I have tried so far: public MemoryStream GetExcelSheet() { using (var package = new ExcelPackage()) { ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("Test"); var val = worksheet.DataValidations.AddListValidation("A:A"); val.Formula.Values.Add("Male"); val.Formula.Values.Add("Female"); val.ShowErrorMessage = true; worksheet.Cells["A1"]