TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shailendra singh
NA
23
0
Need to add Dropdown in Excel using ASP.NET CORE 2.0
May 23 2018 1:31 AM
I want to add dropdown list in excel sheet using asp.net core 2.0 application .I am using
using Microsoft.AspNetCore.Hosting;
MemoryStream stream = new MemoryStream();
using (ExcelPackage package = new ExcelPackage(stream))
{
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("QuesAnsDetails");
I have created list values in dropdown but not able to add list values in run time
var list1 = new System.Collections.Generic.List<string>();
list1.Add("Charlie");
list1.Add("Delta");
list1.Add("Echo");
var flatList = string.Join(",", list1.ToArray());
QuestionAnswerEntity questionAnswerEntity = new QuestionAnswerEntity();
questionAnswerEntity.CallDriverId = 0;
questionAnswerEntity.UserName = string.Empty;
var list = this._iQuestionAnswerBLL.GetQuestionAnswerFormat(questionAnswerEntity);
for (int i = 0; i < list.Count - 1; i++)
{
worksheet.Cells[i + 2, 1].Value = list[i].CallDriverName;
worksheet.Cells[i + 2, 2].Value = list[i].ScenarioName;
worksheet.Cells[i + 2, 3].Value = list[i].LearningActivityId;
worksheet.Cells[i + 2, 4].Value = list[i].LearningActivityName;
worksheet.Cells[i + 2, 5].Value = list[i].Question;
worksheet.Cells[i + 2, 6].Value = list[i].Answer1;
worksheet.Cells[i + 2, 7].Value = list[i].Answer2;
worksheet.Cells[i + 2, 8].Value = list[i].Answer3;
worksheet.Cells[i + 2, 9].Value = list[i].Answer4;
// worksheet.Cells[i + 2, 10].Value = list[i].CorrectAnswer;
worksheet.Cells[i + 2, 10].Value = list1
}
Reply
Answers (
1
)
how to give email after suceesfully registration
There is no ViewData item of type 'IEnumerable<SelectListIte