I'm using EEPLUS to export a preformated-excel using for that DataValidation Lists, but I'm getting Error in a large List, here is the code:
ExcelPackage pck = new ExcelPackage();
var ws = pck.Workbook.Worksheets.Add("Testing");
ws.Cells["A1"].Value = "Column A";
ws.Cells["B1"].Value = "Column B";
ws.Cells["C1"].Value = "Column C";
ws.Cells["A1:C1"].Style.Fill.PatternType = ExcelFillStyle.Solid;
ws.Cells["A1:C1"].Style.Fill.BackgroundColor.SetColor(Color.FromArgb(184, 204, 228));
ws.Cells["A1:C1"].Style.Font.Bold = true;
var val = ws.DataValidations.AddListValidation("B2:B10000");
val.ShowErrorMessage = true;
val.Formula.Values.Add("Add");
val.Formula.Values.Add("Delete");
var val2 = ws.DataValidations.AddListValidation("C2:C10000");
val2.ShowErrorMessage = true;
foreach (var student in classroomDictionary) val2.Formula.Values.Add(student["Name"]);
Response.BinaryWrite(pck.GetAsByteArray());
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=etiquetas-{0}.xlsx", DateTime.Now.ToString("ddMMyyyy")));
As you can see, I'm creating 3 columns where the 2nd and 3r with DataValidation ListValidation.
The 2nd column works great, but the 3r which I'm adding 200 items creates the Excel Workbook but I'm getting an error when I'm trying to oppening. There is a limitation for the numbers of items? Is a Excel limitation or EEPLUS limitation or is a problem with my code?
In english sais something like: Excel found content that cannot be reading in... Do you want to recover the book content?...
Thank you BR