1

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?

4
  • this shows the mapping : codeproject.com/Articles/18418/… Commented Jul 18, 2013 at 8:16
  • Any reasons to not use OLEDB Adapter? Commented Jul 18, 2013 at 8:19
  • @Sam => Thanks, I'll check that now. Commented Jul 18, 2013 at 8:22
  • @RameezAhmedSayad => To be honest I'm following the instructions I received. Commented Jul 18, 2013 at 8:24

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.