asp.net¶ÁÈ¡EXcelµÄСÌÖÂÛ
ÔÚCSÎļþÖУ¬Ê×ÏÈÔÚ¶¥²¿ÒýÈë²Ù×÷ExcelÊý¾ÝµÄÃüÃû¿Õ¼ä
using System.Data.OleDb;
Õýʽ´úÂëÈçÏ£º
private void Button_Click(object sender, System.EventArgs e)
{
string thefullname = this.uploadFile.PostedFile.FileName;//»ñÈ¡ÍêÕû·¾¶
ClientScriptManager csm = Page.ClientScript;
if (thefullname == "")
{
csm.RegisterStartupScript(GetType, "Error", "alert('ÇëÑ¡ÔñÒªÉÏ´«µÃExcelÎļþ');", true);
return;
}
int fileLength = this.uploadFile.PostedFile.ContentLength;
if (fileLength > 512000)
{
csm.RegisterStartupScript(GetType, "Error", "alert('ÎļþÒѳ¬¹ý500K£¬ÎÞ·¨ÉÏ´«£¡');", true);
return;
}
FileInfo info = new FileInfo(thefullname);
string fileExt = info.Extension;
if (fileExt.ToLower() != ".xls")
{
csm.RegisterStartupScript(GetType, "Error", "alert('²»ÊÇExcelÎļþ£¬ÇëʹÓÃÕýÈ·µÄÎļþ¸ñʽ£¡');", true);
return;
}
string uploadPath = Page.MapPath(@"uploadfile\report.xls");
 
Ïà¹ØÎĵµ£º
TreeView ¿Ø¼þ¾ßÓÐÐí¶à²»Í¬µÄÍâ¹Û£¬´Ó¶ø¿ÉÒÔÌṩÁé»îµÄͼÏñ×Ô¶¨ÒåÒÔ¼°Ö¸¶¨×Ô¶¨ÒåÓû§½çÃæ (UI) Ñ¡ÏîµÄÊôÐÔ¡£Äú¿ÉÒÔ½«Í¼ÏñÓë TreeView ¿Ø¼þÒ»ÆðʹÓÃÀ´±íʾ½Úµã¡¢Á¬½ÓÏßÒÔ¼°Õ¹¿ªºÍÕÛµþͼ±ê¡£»¹¿ÉÒÔʹÓà ImageSet ÊôÐÔÖÐÒ»×éÔ¤¶¨ÒåµÄͼÏñ£¬»òÕßͨ¹ýÉèÖø÷¸öͼÏñÊôÐÔÀ´Ê¹ÓÃ×Ô¶¨ÒåͼÏñ¡£
&nbs ......
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
  ......
³ö´¦£º Ì켫yesky ×÷ÕߣºÖìÏÈÖÒ±àÒë ʱ¼ä£º2006-11-15 11:26:00
ÔÚз¢ÐеÄASP.NET 2.0°æ±¾ÖУ¬Î¢Èí²»ÔÙ½¨ÒéʹÓÃSystem.Web.MailÃüÃû¿Õ¼ä¶ø´úÖ®ÒÔеÄSystem.Net.MailÃüÃû¿Õ¼ä¡£ÔÚÕâ¸öпâÖÐÒýÈëÁËÐí¶àÐÂÌØÕ÷£¬µ«ÊÇÔÚ·¢ËÍÓʼþµÄ·½Ê½·½ÃæÒ²ÏàÓ¦µØ´øÈëÁËһЩС´íÎó¡£
Ò»¡¢ ·¢ËÍÓʼþ
ÔÚÏêϸÌÖÂÛÕ ......
³ö´¦£º¶¯Ì¬ÍøÕ¾ÖÆ×÷Ö¸ÄÏ ×÷Õߣº¶¯Ì¬ÍøÕ¾ÖÆ×÷Ö¸ÄÏ Ê±¼ä£º2006-3-20 12:40:00
Ò»¸öÎüÒýÈ˵ġ¢¹¦ÄÜÍ걸µÄÍøÕ¾ÍùÍù¾ßÓÐÒÔÏÂÌØÕ÷£ºÒ»ÊÇÄÚÈݳäʵ¡¢ÊµÓã¬ÎüÒý¶Ô¸ÃÀàÄÚÈݸÉÐËȤµÄä¯ÀÀÕߣ»¶þÊÇÒ³ÃæÉèÖúÏÀí£¬Ò³ÃæÉè¼Æ¾«ÃÀ£»ÈýÊÇÍøÕ¾»¥¶¯ÐÔÇ¿£¬Óû§ºÍÍøÕ¾»òÕßÓû§ÓëÓû§Ö®¼ä½»Á÷·½±ã¸ßЧ£»ËÄÊÇÍøÕ¾ÄÚÈݸüм°Ê±²¢ÇÒ¿ ......