在asp.net MVC上传Excel文件和显示网格 [英] Upload Excel File and display in Grid in asp.net MVC
问题描述
我需要的用户列表从Excel导出到我的asp.net MVC(C#)应用程序。
Excel的应该有这样的名字姓氏电子邮件的标题中,...
及其价值观像 约翰 Smith john@gmail.com,
David Beckam david@gmail.com,
块引用>需要将其存储到我的数据库之前验证值并显示在下一页的网格。
有没有简单的方法来做到这一点,像一个插件?
解决方案我认为,这将是最好的,在这种情况下,使用ADO.NET。
这是如何做到这一点,以读取Excel工作表值的几篇文章:
(1)阅读和写作的Excel US preadsheets使用ADO.NET C#DbProviderFactory(大卫·海登)
(2)导入Excel文件的DataSet($ C $的CProject)
读取Excel文件>我认为这应该让你到你需要去。
迈克 -
I need to export the Users List from excel to my asp.net mvc(C#) application.
The Excel should have an header like First Name Last Name Email,...
and its values like John Smith john@gmail.com, David Beckam david@gmail.com,Need to validate the values before storing it to my database and show it in the grid of next page.
Is there any easy way to do it, like a plugin?
解决方案I think that it would be best, in this case, to use ADO.NET.
A few articles on how to do this in order to read values from an Excel Worksheet:
(1) Reading and Writing Excel Spreadsheets Using ADO.NET C# DbProviderFactory (David Hayden)
(2) Import Excel File to DataSet (CodeProject)
(3) Tips for reading Excel spreadsheets using ADO.NET (Lab49)
(4) Reading Excel files from C# (Stack Overflow)
I think that this should get you to where you need to go.
-- Mike
这篇关于在asp.net MVC上传Excel文件和显示网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!