Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp.net³ÌÐòExcelת³ÉXMLµµ

ͨ¹ýAsp.net(C#)Ó¦ÓóÌÐò¶ÁÈ¡±¾µØÉÏ´«µÄExcleÎļþ,´æ·Åµ½DataSetÖÐ,ͨ¹ýDataSetÖеķ½·¨Ö±½ÓÉú³ÉXMLÎļþ.
C# Code
 if (this.FileUpload1.PostedFile != null)
        {
            string filename = this.FileUpload1.FileName.ToString();
            string path = @Server.MapPath("../File/") + filename;
            this.FileUpload1.PostedFile.SaveAs(path);
            //¶ÁÈ¡Óû§ÉÏ´«µÄExcleÎļþ
            string conn="Provider = Microsoft.Jet.OLEDB.4.0 ;Data Source ='"+path+"';Extended Properties=Excel 8.0";
            OleDbConnection olecon = new OleDbConnection(conn);
            olecon.Open();
            //×¢Òâ±íÃû,´ò¿ªExcelÎļþºó,×îµ×²¿·ÖÒ³µÄExcleÃû×Ö,
            //ĬÈÏÊÇ$Sheet1,$Sheet2,$Sheet3
            string sql = "select * from [$Sheet1]";
            OleDbDataAdapter oleda = new OleDbDataAdapter(sql,conn);
            oleda.Fill(ds);
            olecon.Close();
            this.GridView1.DataSource = ds;
            this.GridView1.DataBind();
            string file_name = "20091126002.xml";
        &nb


Ïà¹ØÎĵµ£º

²éѯXMLÎĵµ

±êÇ©£ºÊý¾Ý·ÃÎÊ     ADO.NET
    ²éѯXMLÎĵµ     LINQ to XMLÀàÌṩÊôÐԺͷ½·¨£¬·µ»Ø¿É²éѯµÄÀàµÄ¶ÔÏ󼯺ϡ£
    ½«XML¶ÔÏó×÷ΪLINQ²éѯ¶ÔÏó£º
......

StAX Éú³ÉXMLÎļþ

²Î¿¼£º°Ù¶È°Ù¿Æ http://baike.baidu.com/view/1027076.htm?fr=ala0
ÔÚJDK 6.0ÖлùÓÚStAX·ÖÎöXMLÊý¾Ý£º http://hi.baidu.com/1shome/blog/item/5baaee01db2609051d958302.html
DOM¡¢SAX
¡¢DOM4J¡¢JDOM¡¢StAXÉú³ÉXML
²¢·µ»ØXML×Ö·û´®ÐÎʽ£ºhttp://dreams75.javaeye.com/blog/512319
STAX:Streaming API for XML (StAX)
......

xml

¡¡¡¡XML£¨Extensible Markup Language£©¼´¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¬ËüÓëHTMLÒ»Ñù£¬¶¼ÊÇSGML(Standard Generalized Markup Language,±ê׼ͨÓñê¼ÇÓïÑÔ)¡£XmlÊÇInternet»·¾³ÖÐ¿çÆ½Ì¨µÄ£¬ÒÀÀµÓÚÄÚÈݵļ¼Êõ£¬Êǵ±Ç°´¦Àí½á¹¹»¯ÎĵµÐÅÏ¢µÄÓÐÁ¦¹¤¾ß¡£À©Õ¹±ê¼ÇÓïÑÔXMLÊÇÒ»ÖÖ¼òµ¥µÄÊý¾Ý´æ´¢ÓïÑÔ£¬Ê¹ÓÃһϵÁмòµ¥µÄ±ê¼ÇÃèÊöÊý¾Ý£¬¶øÕâЩ±ê¼Ç¿É ......

ASP.NETѧϰ±Ê¼ÇËÄ ¿Ø¼þʹÓÃ

 ASP.net¿Ø¼þ·ÖÀࣺ
1¡¢HTML¿Ø¼þ System.Web.UI.Htmlcontrols
 ÆÕͨHTML½Å±¾¿Ø¼þ£¬ÊôÓÚ¿Í»§¶Ë¿Ø¼þ£¬ÓÃÓÚ¿Í»§¶Ë½âÊÍÒ³ÃæµÄÏÔʾµÄÄÚÈÝ
 Ò²¿ÉÒÔת»¯³É·þÎñÆ÷¿Ø¼þ£¬Ö»ÐèÒª¼ÓÉÏÊôÐÔ runat="server"
 È磺Îı¾¿òÅäºÏ°´Å¥Ê¹ÓÃ
ÐÕÃû: <input id="txtUserName" name="txtUserName" type="text" /&g ......

ASP.NET


      ͨ¹ý SqlDataSource ¿Ø¼þ£¬¿ÉÒÔʹÓà Web ·þÎñÆ÷¿Ø¼þ·ÃÎÊλÓÚ¹ØÏµÊý¾Ý¿âÖеÄÊý¾Ý¡£ÆäÖпÉÒÔ°üÀ¨ Microsoft SQL Server ºÍ Oracle Êý¾Ý¿âÒÔ¼° OLE DB ºÍ ODBC Êý¾ÝÔ´¡£Äú¿ÉÒÔ½« SqlDataSource ¿Ø¼þÓëÊý¾Ý°ó¶¨¿Ø¼þ£¨Èç GridView¡¢FormView ºÍ DetailsView ¿Ø¼þ£©Ò»ÆðʹÓã¬Óü«ÉÙ´úÂë»òÉõÖÁ² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ