Using SQL Bulk Copy to fill a database table

asp.net asp.net-mvc c# excel sqlbulkcopy

Question

I'm working on an web app using ASP.NET MVC4. I have an Excel file with several columns (some of them are useless) and I'd like to export the data to a related table by uploading the file.

One of my superiors told me to use SQL Bulk Copy to do that. I search some information about that but nothing really interesting (for example, nothing about how to map the excel columns and the table fields).

Any idea/tutorial to do that?

1
1
11/29/2013 7:00:50 AM

Accepted Answer

Hello friend please review this article, i think it will contains all the required information you needed. but you need to do some modification as per your requirement.

SQLBulk insert from Excel

if you are facing any connection issue with your Excel workbook, please modified your excel connection string for that there is a good article provide all the necessary information regarding Excel connection string Excel Connection String Sample

1
7/18/2013 10:41:06 AM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow