【问题标题】:Insert data in SQL Server database from excel using HTTP Post [duplicate]使用 HTTP Post 从 excel 将数据插入 SQL Server 数据库 [重复]
【发布时间】:2011-06-14 21:09:14
【问题描述】:

可能重复:
Insert data in SQL Server database from excel using HTTP Post

如何使用 HTTP Post 将 Excel 中的 SQL Server 数据库中的数据插入到 C# ASP.NET 项目中?

假设 URL 是:http://testingHttpPost/,当我在 Excel 中单击“插入”按钮时,我想分别将单元格 A2 和 B2 中的数据插入到“StudentId”和“StudentAge”列的“StudentTable”中。

我在学生控制器中有一个 ActionResult 方法“InsertStudent”。

【问题讨论】:

    标签: c# asp.net-mvc vba http-post


    【解决方案1】:

    您可以通过此链接中的按钮运行 c# 代码: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

    在您的 c# 代码中,您可以从 excel 表中读取值并调用 Web 服务

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-22
      • 2012-01-31
      • 2012-11-23
      • 2018-04-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多