Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Here is my ASP.net C# Solution MVC Structure.

*Solution "ExcelToSql"

  • ExcelToSql
  • ExcelToSql.Bussiness
  • ExcelToSql.Contract
  • ExcelToSql.DataAccess


ExcelToSql is MVC Project

ExcelToSql.Bussiness project is use to connect ExcelToSql MVC Controller and ExcelToSql.Contract Model class.
ExcelToSql.Contract project contain Interfaces folder and it implement interfaces for each model.
ExcelToSql.DataAccess project contain methods which are implement in interfaces Data Access layer query written using linq.

My question is how can I browse excel sheet using my ExcelToSql MVC project, View (Add.cshtml) and insert excel data in to MS SQl 2012 DataBase.

My Sql DB Table(Student) structure is,

VB
Id | Name|Address|Course Name|Start Date|End Date|


Id is auto increment field.
Posted
Updated 9-May-15 19:37pm
v2
Comments
Mehdi Gholam 10-May-15 4:05am    
...and what have you done so far?
sachika_88 10-May-15 4:13am    
I refer : http://www.codeproject.com/Tips/752981/Import-Data-from-Excel-File-to-Database-Table-in-A

But I cant manage that code for my project structure.
Please help me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900