Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have idea where and how to start with this project as I am very new to this.

I have an Excel spreadsheet with columns that match that of a SQL table (SQL Server 2008 R2). I want to add a button that will loop through the rows in my Excel sheet and based on the values (multiple cells) update or insert data in SQL.

Any help would be greatly appreciated.
Posted

Use ADODB[^]. Here[^] is a list of code examples. ;)
 
Share this answer
 
Did you search Google?
I got this article from Google search("codeproject excel to sql")
Import Data from Excel to SQL Server[^]

EDIT
-------------
Compare two data tables in C#[^]
 
Share this answer
 
v2
Comments
DoubleD1982 19-Dec-13 6:25am    
Not really what I'm looking for. That describes how to get data from SQL, Insert data or delete using aspx page. I want a button in excel that will loop through my existing data in Excel, compare it to what is in the SQL table and if the data exists and there was a change on a specific cell then it must update the sql table, else it must insert new row with the values from excel.
thatraja 19-Dec-13 7:25am    
You should have mentioned this in your question, check my answer again, it has a sample way, you could find more in web. And use Google.

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