E-Mail:
Author Avatar

Import Excel Spreadsheet Data into SQL Server Database Table Using SqlBulkCopy

OK, so the need to export Excel Spreadsheet data over to a SQL Server Database Table does not present itself to me everyday. No matter, this is just one more talent that I can not put under my belt thanks to the article below.

Per another question I received, the last thing I wanted to mention on the subject of Excel is that you can use SqlBulkCopy to transfer Excel Spreadsheet data at high speeds to a SQL Server Database Table. I talked about SqlBulkCopy in a previous ADO.NET Tutorial:

* SqlBulkCopy - Copy Table Data Between SQL Servers at High Speeds - ADO.NET 2.0 New Feature

You can view my other posts on Excel for more information about using ADO.NET to read and write to Excel Workbooks and Worksheets:

* Reading Excel Worksheet and Column Schema Information Using ADO.NET 2.0 and GetSchema
* Reading and Writing Excel Spreadsheets / Worksheets Using ADO.NET C# DbProviderFactory….. Source: davidhayden.com

Tags: , , , ,

5 Comments

hi im wondering if anyone knows for real how to import data from excel into an sql database…i have to update my maid service clients in mississauga and am having the hardest time…thanks.

contact me for working code - solved csv import today

Do you have a tutorial on how to get data from a spread sheet into a sql database on an linux webserver, my knowledge of php and sql is at a real beginner stage, I can create a table via cpanel on the server but then have no idea how to get the data across after this, I just built a form and script and submitted over 200 names this way to get the data inserted.The thought of doing such a mind numbing task again is not a good one.

Cheers

Ian

how to import ms access database to sql server with different structure in C #. plz send me code

I have a small sports website. I have made a simulation model for 2 teams that generates a final score, box score , and player statistics on an excel spread sheet. I need to get this into another code to upload it to the website. I have some that is helping me, but I have to believe there is an easier way for me to make this project come to life. thanks in advance.
Ed

What Do You Think?

 


Anti-Spam Image

Want to Start a Blog Here for Free?

Are you an expert in one subject or another? If your goal is to help others and dispense hard-earned information back to the community, stake a claim on your very own Lockergnome blog today! You can write about anything - no matter the topic. Sign-up to start blogging!

Author Avatar
SEO - Mar 6, 2008

Using Differentiators In Keyphrases