I am using ASP.Net and Open office XML and I have been able to set the headers of the excel file.
However, I want to set the value to cells from say D2 to D1000 in a drop down fashion i.e. that the user can only select from
a predefined list of values as in a drop down list. How do I accomplish this using openoffice excel?
I have already done this using Office Interop.
The code for creating the excel is
List<ExcelExport> mpList =newList<ExcelExport>();DataTable dt =ListToDataTable(mpList);string attachment =string.Format("attachment;filename={0}-{1}.xlsx", ddlHealthFacility.SelectedItem.Text+" Excel export "," ");using(ExcelPackage pck =newExcelPackage()){//Create the worksheetExcelWorksheet ws = pck.Workbook.Worksheets.Add("Monthly Plan"); ws.Cells["A1"].LoadFromDataTable(dt,true);Byte[] fileBytes = pck.GetAsByteArray();Response.Clear();Response.Buffer=true;Response.AddHeader("content-disposition", attachment);Response.Charset="";Response.ContentType="application/vnd.ms-excel";StringWriter sw =newStringWriter();Response.BinaryWrite(fileBytes);Response.End();}