Asp.Net ¶ÁÈ¡Excel
½ñÌìΪÁË×ö²åÈëÊý¾ÝÕÒÁ˲»ÉÙ¶«Î÷£¬ÒòΪ´ÓÀ´Ã»ÓÐд¹ý¶ÁдExcel£¬Ò²²»ÖªµÀ¸ÃÔõôд¡£ÏÂÃæµÄÊǽñÌìͨ¹ý²é¿´ÂÛ̳×Ô¼ºÐ´³öÀ´ÁË¡£
¹¦ÄÜÊǶÁÈ¡Excel È»ºó°ÑÊý¾Ý²åÈëÊý¾Ý¿â¡£Õâ¸ö¹¦ÄÜÔÚÆóÒµÀïÊǷdz£³£¼ûµÄÒ²Êdz£Óõģ¬Ï£Íû¶ÔÅóÓÑÃÇÓаïÖú£¡
/// <summary>
/// µ¼Èëexcel
/// </summary>
/// <param name="filepath">Îļþ¾ø¶Ô·¾¶</param>
/// <param name="sheetname">Excel±íÃû</param>
/// <returns></returns>
private DataSet ExcelDataSource(string filepath, string sheetname)
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath + ";Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(strConn);
OleDbDataAdapter oada = new OleDbDataAdapter("select * from [" + sheetname + "$]", strConn);
DataSet ds = new DataSet();
oada.Fill(ds);
return ds;
}
protected void Page_Load(object sender, EventArgs e)
{
string filePath = @"E:\н¨Îļþ¼Ð (2)\³¤°²ÇøÊý×ÖµØÃûµÇ¼Ç±í.xls";
DataSet ds = ExcelDataSource(filePath, "Sheet1");
DataTable dt = ds.Tables[0];
///DateTableÒѾ°ÑExcelµÄÊý¾Ý¶ÁÈ¡³öÀ´È»ºó¾Í²åÈëÄãµÄÊý¾Ý¿â°É£¡
}
Ïà¹ØÎĵµ£º
ÊÓͼ״̬ÊÇ ASP.NET Ò³¿ò¼ÜÓÃÓÚÔÚÍù·µ¹ý³ÌÖ®¼ä±£ÁôÒ³ºÍ¿Ø¼þÖµµÄ·½·¨¡£ÔÚ³ÊÏÖÒ³µÄ HTML ±ê¼Çʱ£¬±ØÐëÔڻط¢¹ý³ÌÖб£ÁôµÄÒ³ºÍÖµµÄµ±Ç°×´Ì¬½«±»ÐòÁл¯Îª Base64 ±àÂë×Ö·û´®¡£È»ºó£¬´ËÐÅÏ¢½«±»·ÅÈëÒ»¸ö»ò¶à¸öÊÓͼ״̬Òþ²Ø×ֶΡ£
1¡¢·½°¸
ÊÓͼ״̬ÓÉ ASP.NET Ò³¿ò¼Ü×Ô¶¯ÓÃÓÚ±£´æÔÚ¸ ......
Ò»¡¢Î¯ÍÐ
£¨1£© ίÍÐʱһÖÖÒýÓ÷½·¨µÄÀàÐÍ£¬Ò»µ©ÎªÎ¯ÍзÖÅäÁË·½·¨£¬Î¯Íн«Óë¸Ã·½·¨¾ßÓÐÍêÈ«ÏàͬµÄÐÐΪ£¬Î¯Íз½·¨µÄ´øŶÓÿÉÒÔÏñ
ÆäËû·½·¨Ò»Ñù£¬¾ßÓвÎÊýºÍ·µ»ØÖµ£¬
È磺 public delegate int PerformCa ......
Èý²ã¼Ü¹¹(3-tier application) ͨ³£ÒâÒåÉϵÄÈý²ã¼Ü¹¹¾ÍÊǽ«Õû¸öÒµÎñÓ¦Óû®·ÖΪ£º±íÏֲ㣨UI£©¡¢ÒµÎñÂß¼²ã£¨BLL£©¡¢Êý¾Ý·ÃÎʲ㣨DAL£©¡£Çø·Ö²ã´ÎµÄÄ¿µÄ¼´ÎªÁË“¸ßÄÚ¾Û£¬µÍñîºÏ”µÄ˼Ïë¡£
1¡¢±íÏֲ㣨UI£©£ºÍ¨Ë×½²¾ÍÊÇÕ¹ÏÖ¸øÓû§µÄ½çÃ棬¼´Óû§ÔÚʹÓÃÒ»¸öϵͳµÄʱºòËûµÄËù¼ûËùµÃ¡£
2¡¢ÒµÎñ ......
Asp.net ÓÃurlÖØд(URLReWriter)ʵÏÖÈÎÒâ¶þ¼¶ÓòÃû
ÎÒ×î½üдÁ˸öСÀý×Ó,´ó¼Ò¿ÉÒÔÏÈ¿´Õâ¸ö,ÀïÃæÓÐСÀý×ÓµÄÍêÕû´úÂëÏÂÔØ.
http://www.cnblogs.com/notus/archive/2009/03/26/1422548.html
ºÃ¾ÃûÓÐд¼¼ÊõÎÄÕÂ,Èç¹û´ó¼Ò¿´²»Ã÷°×,¾Í¶à¿´¼¸Æª,º¹,»òÕß,ÔÚÎÄÕµĺóÃæ»Ø¸´(ÕâÊÇ×îÓÐЧµÄ°ì·¨),ÎһᾡÁ¦°ïÖú´ó¼Ò½â´ðÒÉ»ó.
À´ ......
public class chs2py
{
public chs2py()
{
//
//TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
}
private static int[] pyvalue = new int[]{-20319,-20317,-20304,-20295,-20292,-20283,-20265,-20257,-20242,-20230,-20051,-20036,-20032,-20026,& ......