【问题标题】:Upload Excel File and display in Grid in asp.net MVC在asp.net MVC中上传Excel文件并在Grid中显示
【发布时间】:2010-12-05 22:07:15
【问题描述】:

我需要将用户列表从 excel 导出到我的 asp.net mvc(C#) 应用程序。

Excel 应该有一个类似 First Name Last Name Email 的标题,...
及其价值观,例如                                John          Smith           john@gmail.com, 大卫         贝克姆       david@gmail.com,

需要先验证这些值,然后再将其存储到我的数据库中并在下一页的网格中显示。

有没有简单的方法,比如插件?

【问题讨论】:

    标签: c# asp.net-mvc excel upload


    【解决方案1】:

    我认为在这种情况下,最好使用 ADO.NET。

    有关如何执行此操作以从 Excel 工作表中读取值的几篇文章:

    (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)

    我认为这应该能让你到达你需要去的地方。

    -- 迈克

    【讨论】:

    • 更新了之前损坏的链接。
    猜你喜欢
    • 2021-07-23
    • 2018-01-14
    • 2023-04-03
    • 1970-01-01
    • 2015-10-11
    • 1970-01-01
    • 1970-01-01
    • 2014-08-06
    • 1970-01-01
    相关资源
    最近更新 更多