问题
I need help. How can i add a drop down in excel using Epplus? No need for validation. I just need to add this to my template. Records in the drop down are not dynamic.
回答1:
using (ExcelPackage p = new ExcelPackage()) {
ExcelWorksheet ws = obj.CreateSheet(p, "sheetname", 1, true);
var unitmeasure = ws.DataValidations.AddListValidation("a1");
unitmeasure.Formula.Values.Add("Sq Ft");
unitmeasure.Formula.Values.Add("Meter");
}
来源:https://stackoverflow.com/questions/40614881/add-drop-down-in-excel-using-epplus