• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

在Excel.netExcel工作表数据加载到SQL Server#

用户头像
it1352
帮助1

问题说明

尝试在ASP中使用C#将数据从excel导入到SQL Server。净。我必须提供客户端选项来浏览和上传Excel文件数据到Sql server表。我没有生产Web服务器的写权限,其中应用程序将托管在IIS服务器上。所以,我不能使用FileUpload,其中excel表将首先保存在Server Path中,然后使用BulkReader。请告诉我任何替代方法来实现这一点。谢谢!

Am trying to Import Data from excel to Sql server using C# in ASP. NET. I have to give client side options to browse and upload excel file data to Sql server tables.I don't have write permission on Production Web Server, where the Application will be hosted on IIS Server. So, I cannot use FileUpload where excel sheet will be first saved in in Server Path and then use BulkReader.Please suggest me any alternative way to achieve this. Thanks!

正确答案

#1
没有批量上传的更慢的解决方案 - 循环数据,构建插入查询和插入数据。
Slower solution without bulk upload - loop through data, build insert queries and insert data.
存储数据到来自excel的数据表然后使用批量插入上传到sqlserver。

点击链接:

http://jubayerdevs.blogspot.hk/2013/10/store-excel-data-to-datatable-and-copy.html [ ^ ]
store data to datatable from excel then upload to sqlserver using bulk insert.
follow the link:
http://jubayerdevs.blogspot.hk/2013/10/store-excel-data-to-datatable-and-copy.html[^]
在这里阅读:

http://technet.microsoft.com/en-us/library/ms345167.aspx [ ^ ]

和这里:

http://blogs.msdn.com/b/mattm/archive/2008/12/30/samples-for-creating-ssis-packages-programmatically.aspx [ ^ ]
Read here:
http://technet.microsoft.com/en-us/library/ms345167.aspx[^]
and here:
http://blogs.msdn.com/b/mattm/archive/2008/12/30/samples-for-creating-ssis-packages-programmatically.aspx[^]

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfgchi
系列文章
更多 icon
同类精品
更多 icon
继续加载