本文介绍了在asp.net MVC上传Excel文件和显示网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要的用户列表从Excel导出到我的asp.net MVC(C#)应用程序。
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文件和显示网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!