我们将excel文件数据读入gridview [英] ho we read excel file data into gridview

查看:73
本文介绍了我们将excel文件数据读入gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在asp.net中读取xml文件数据到gridview

how we read the xml file data into gridview in asp.net

推荐答案

使用C#,VB.NET将Excel数据导入/上传到Asp.net Gridview [ ^ ]

如何在ASP.NET中显示XML文件数据 [ ^ ]

如何将Excel工作表数据读入或导入ASP.Net GridView [ ^ ]

如何阅读MS Excel文件并填入GridView [
从ASP.NET中的Excel文件(.xlsx)读取数据 [ ^ ]

使用类型化数据集和TableAdapter导入Excel电子表格 [ ^ ]
Import/Upload Excel Data to Asp.net Gridview in C#, VB.NET[^]
How to display XML file data in ASP.NET[^]
How to Read or Import Excel Sheet Data into ASP.Net GridView[^]
How to read MS Excel file and populate into GridView[^]
Read Data From an Excel File (.xlsx) in ASP.NET[^]
Importing an Excel Spreadsheet Using Typed DataSets and TableAdapters[^]


<script runat="server">
    void Page_Load(Object sender, EventArgs e)
    {
        DataSet authorsDataSet;
        string filePath = Server.MapPath("Authors.xml");
        authorsDataSet = new DataSet();
        //Read the contents of the XML file into the DataSet
        authorsDataSet.ReadXml(filePath);
        authorsGird.DataSource = authorsDataSet.Tables[0].DefaultView;
        authorsGird.DataBind();
    }

</script>





如果需要,请使用此命令并提供xml文件的路径。



Use this where required and give the path of xml file.


有很多链接可以回答你的问题。

看看codeproject的这个链接。



如何使用c#将excel文件导入到asp.net中的网格视图并将网格视图保存到数据库sql server 2005 [ ^ ]看看解决方案3.



这绝对符合您的期望。
There are numerous link available which will give answer to your question.
Have look at this link of codeproject.

How to import excel file to grid view in asp.net using c# AND save grid view to database sql server 2005[^] Have a look at the solution3.

This will definitely meet your expectation.


这篇关于我们将excel文件数据读入gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆