asp.net ½«excel±íµÄÄÚÈݲåÈëµ½Êý¾Ý¿â
ÔÚc#À
ÎÒ×öµÄÊǵײãµÄ²åÈë¡£
ʵÌå²ã£¬Êý¾Ý²ã£¬ÒµÎñ²ãÒѾÓбíµÄÊôÐÔÁË£¬
ҪʵÏÖ½«excel±íÀïµÄÄÚÈݲåÈëµ½ÒÑÓеÄÊý¾Ý¿âµÄijһ±íÖС£
±ÈÈçexcel±íÀïÓÐÊôÐÔA,B,C,D,E
Êý¾Ý¿âÀïµÄ±íµÄÃû×ÖÊÇexcelTable
²åÈëµÄʱºòÊÇÒÔÐеÄÐÎʽ²åÈëµÄ£¬
ÇóʵÏִ˲Ù×÷µÄÈ«²¿´úÂë~~
лл£¡£¡£¡
public DataSet ExcelToDS(string Path)
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Path + ";" + "Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
string strExcel = "";
OleDbDataAdapter myCommand = null;
DataSet ds = null;
strExcel = "select * from [sheet1$]";
myCommand = new OleDbDataAdapter(strExcel, strConn);
ds = new DataSet();
myCommand.Fill(ds, "table1");
return ds;
}
°ÑexcelÊý¾Ý¶Áµ½DataSetÖÐÈ»ºóÔÙ²åÈëµ½Êý¾Ý¿â¾Í¿ÉÒÔÁË
private void button1_Click(object sender, System.EventArgs e)
{
//Ñ¡ÔñÎļþ
ofdSelec
Ïà¹ØÎÊ´ð£º
ллÁË£¬¸ßÊÖÃÇ¿ìÀ´°¡~
¹À¼Æû²å¼þʲôµÄ²»Ðаɡ£
ÎÒÒ²Òª лл¸÷λ·¢ÎÒÒ»·Ýliujintaohfbb@163.com
ллÁË Ò»¶¨Òª·¢ÎÒ°¡
¶÷ÕÒµ½ÁË,±ðÍüÁ˶
401533349@163.com
http://download.csdn.n ......
ÎÒʹÓÃODBCÁ¬½ÓsysbaseÊý¾Ý¿â£¬ÔÚasp.netÖÐÓÃSqlDataSourceÉèÖÃÊý¾ÝÁ¬½Ó£¬¹ý³ÌÖгöÏÖÒ»¸öµ¯³ö¿òûÓÐ˵Ã÷¾ÍÊÇÒ»¸ö¾¯¸æµÄͼ±ê¡¢Ò»¸öÈ·¶¨°´Å¥£¬µã»÷¼ÌÐø£¬Äܹ»Íê³É²éѯ¡£ÔÚä¯ÀÀÆ÷ÉÏÔËÐÐʱ»¹Êǵ¯³öÄǸöµ¯³ö¿ò£¬±ØÐëµã»÷² ......
ÎÒÒѽ«Windows¿Ø¼þ³É¹¦Ó¦ÓÃÓÚAsp.netÖУ¬µ«Õâ¸ö¿Ø¼þ»¹Òª·ÃÎÊÊý¾Ý¿â¡¢½øÐб¾µØIO²Ù×÷¡¢´òÓ¡µÈ£¬Õâʱ¾Í»á³öÏÖ¡°Ó¦ÓóÌÐòÊÔͼִÐа²È«²ßÂÔ²»ÔÊÐíµÄ²Ù×÷¡±ÕâÑùµÄÌáʾ£¬Ó¦¸ÃÔõÑù¸øËüÊÚȨ£¿
ÔÚ¿Í»§¶ËÒªÅäÖÃ,ÔÊÐí¿Í»§¶ËÈ ......
ÏÖÔÚASP.NET»¹ÓбØÒªÉú³É¾²Ì¬Ò³ÃæÂð£¿
×ܵÄÀ´Ëµ£º¿Í»§ËµÁËËã
µÈÂ¥ÏÂ˵
»º´æ
¿´ÄãµÄʵ¼ÊÓ¦ÓÃÁË°¡,ÄãÏëÏëÈç¹ûÄãµÄÒ»¸öÍøÕ¾Ãæ¶Ô°ÙÍò¼¶Óû§,¶øÄãÿ¸öaspxÒ³Ãæ¼ÙÉèÓÐ10¸ösql²éѯ,ÄÇ»áÊÇÔõôÑùµÄ? ÌÈÈôÄ ......