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

Asp.net ¶ÁÈ¡EXCEL2007/2003 Êý¾Ý

Public DataTable GetDataTablefromExcel(string fileName,string tableName )
{
string connStr = "Provider=Microsoft.ACE.OLEDB.12.0; Persist Security Info=False;Extended Properties=Excel 8.0; data source=Îļþ·¾¶" 
string sql = "SELECT * from [" + tableName + "]";
OleDbConnection conn = new OleDbConnection(connStr);
try
{
   conn.Open();
   DataSet ds = new DataSet();
   OleDbDataAdapter da = new OleDbDataAdapter(sql, connStr);
   da.Fill(ds);
}
catch (Exception)
{
     throw;
}
finally
{
    conn.Close();
}
}
 
Microsoft.ACE.OLEDB.12.0:odbcÇý¶¯³ÌÐò¿ÉÒÔ¶ÁÈ¡*.xls,*.xlsx,*.xlsm,*.xlsb¸ñʽµÄÎļþ¡£


Ïà¹ØÎĵµ£º

¡¾ASP.NETרÌâ¡¿(5)——ÈçºÎÏòView´«Öµ

ÉÏһƪÎÄÕÂÏêϸ½éÉÜÁËÈçºÎÀûÓÃASP.NET MVC´´½¨×Ô¼ºµÄÒ³Ã棬ÔÚÎÄÕ½éÉÜÁËÈçºÎÀûÓÃViewDataÓÉControllerÏòViewÎļþ´«Öµ£¬ÄÇеÄÎÊÌâÔٴγöÏÖ£¬ÎÒÃdzýÁËÄÜÏÔʾaspxÎļþÍ⻹ÄÜÏÔʾÆäËüµÄÎļþô£¿
±¾ÎĽ«Ïêϸ½éÉÜÈçºÎÏòView´«Öµ¡£
Ò»¡¢ViewDataÓëTempDataÊôÐÔÀ´ÏòViewÒ³´«µÝ¶ÔÏó
ÉÏÎÄÖÐÒѾ­Ìáµ½,ʹÓÃViewData¿ÉÒÔ½«Êý¾ÝÓÉCont ......

´¦ÀíÓзµ»ØÖµµÄºÍreturnµÄasp.netд·¨

 SqlConnection   conPortal   =   new   SqlConnection(CommunityGlobals.ConnectionString);  
                          SqlCommand   cmdAdd   =   new   SqlCommand(   "Community_Disc ......

ASP.NET ÎÞÏÞ¼¶·ÖÀà

ÏÂͼÖкìÉ«¼ýÍ·ÊǸ¸Àà ¶øÇÒÊôÓÚ¸ùĿ¼¼¶±ð¡£
¡¡¡¡ÏÂÃæ¸ö×Ö¶ÎΪ£ºID¡¡¡¡¸¸ID¡¡ ÀàÐÍÃû³Æ¡¡ Éî¶È¡¡ ÅÅÐò
¡¡¡¡Ç°Ãæ3¸ö×Ö¶ÎûÓÐʲô¿É½âÊ͵ģ¬×ö¹ýÎÞÏÞ¼¶·ÖÀàÉè¼ÆµÄÈ˶¼Ó¦¸ÃÇå³þ
¡¡¡¡¶øµÚ5¸ö×Ö¶ÎÅÅÐò×Ö¶ÎID£º43µÄ23ÅÅÐò´ú±íËûÔÚÕâÕűíÅÅÔÚ23µÄ¸ùĿ¼
¡¡¡¡¶ø23ÏÂÃæµÄ23,01 ˵Ã÷ËûÊÇ2¼¶·ÖÀ࣬ÅÅÔÚ23ÏÂÃæµÄµÚ01¸ö£¬Ò²ÊÇÖ§³Ö99¼ ......

¡¾ASP.NETרÌâ¡¿(10)——EXT JS ʹÓÃ×ܽá

֮ǰд¹ýһϵÁеÄExtJSµÄʹÓý̳̣¬µ«ÊÇ»ù±¾±È½ÏÁãÉ¢£¬±¾ÎÄÖ÷Òª¶ÔÆä½øÐйéÄÉ×ܽᡣϣÍû¶ÔÓÚ³õѧ»òÕ߸´Ï°extjsµÄͬÃËÃÇÓÐËù°ïÖú¡£
ÁбíÇåµ¥ÈçÏÂËùʾ£º
1¡¢ExtJSµÄʹÓ÷½·¨»ã×Ü(1)——ÅäÖúͱí¸ñ¿Ø¼þʹÓà £º
http://blog.csdn.net/rocket5725/archive/2009/09/09/4535323.aspx
2¡¢ExtJSµÄʹÓ÷½·¨»ã×Ü(2)&mdash ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ