Insert data in SQL Server database from excel using HTTP Post [duplicate]
Possible Duplicate:
Insert data in SQL Server database from excel using HTTP Post
How can I insert data in SQL Server database from Excel using an HTTP Post to a C# ASP.NET project?
Lets say the URL is: http://testingHttpPost/ and I want to insert data from Cells A2 and B2 into "StudentTable" in Columns "StudentId" and "StudentAge" respectively when I click "Inser开发者_如何学Pythont" Button in Excel.
I have an ActionResult method "InsertStudent" in Student Controller.
You can run c# code from a button in this link: http://blogs.msdn.com/b/vsod/archive/2009/10/02/excel-how-to-run-c-code-behind-with-a-click-of-a-button-on-a-worksheet-without-vba-code.aspx
In your c# code you can read values from the excel sheet and call the web service
精彩评论