¹ØÓÚasp.netµ¼³öExcelʱ¹ØÁªÑ¸À×ÏÂÔØ
ÔÚÀûÓÿªÔ´MyXlsµ¼³öExcelʱ£¬¶ÔÓÚ°²×°×ÅѸÀ׵Ŀͻ§¶Ë£¬µ¼³öʱ»á¹ØÁªÑ¸À×£¬Èç¹ûÓÃѸÀ×ÏÂÔØ£¬ÏÂÔصÄÊÇÕâ¸öÒ³Ãæ¼´aspxÎļþ£¬¶ø·ÇÏëÒªµÄµÄ±¨±í
ΪÁ˽â¾öÕâ¸öÎÊÌâ·Ñ¾¡ÐÄ˼£¬bd£¬Google£¬Ã»ÕÒµ½´ð°¸£¬ºóÀ´×Ô¼º¿´¿´Ô´Â룬ϸϸÑо¿ÁËһϽâ¾öÁË
ѸÀ×ÏÂÔØʱÖض¨Î»ÁË×ÊÔ´£¬ËùÒÔÏÂÔصõ½µÄÊÇÍøÒ³µÄ¡£ÕâÑùÎÒÃÇ¿ÉÒÔÿ´Îµã»÷µ¼³öʱתµ½ÁíÒ»¸öеÄÒ³Ã棬ÔÚÐÂÒ³ÃæµÄpage_loadÖд¦Àí
µ¼³ö£¬µ¼³öʱÓÃѸÀ׾ͻáµÃµ½ÐèÒªµÄ±¨±í¶ø²»ÊÇaspxÎļþ¡£µ«ÊÇ»¹ÓÐÎÊÌ⣬¾ÍÊÇÓÃѸÀ×ÏÂÔصı¨±í¿ÉÄÜ´ò²»¿ª»ò³öÎÊÌ⣬ÕâÑùÓÖ·ÑÁËЩÁ¦Æø£¬ÔÚ
´úÂëÖмÓÈëÁËÁ½ÐдúÂ룬²ÅµÃÒÔ½â¾ö¡£¼´£ºÏÈ°ÑÒªµ¼³öµÄ±¨±íÔÚ·þÎñÆ÷±£´æÒ»·Ý£¬ÔÙsend()
ÏÂÃæÊÇÒ»´úÂëʾÀý£º
private
void ExcelExport(IList< LineLossInfo > lossListExcel)
{
XlsDocument xls = new XlsDocument();
xls.FileName = "LineLossMonthDetail.xls";//Ö¸¶¨ÎļþÃû
Worksheet sheet = xls.Workbook.Worksheets.Add("LineLossMonthDetail");
#region ÉèÖø÷Êý¾ÝÁеĴóС
ColumnInfo colInfo1 = new ColumnInfo(xls, sheet);
colInfo1.ColumnIndexStart = 0;
colInfo1.ColumnIndexEnd = 1;
colInfo1.Width = 15 * 256;
sheet.AddColumnInfo(colInfo1);
ColumnInfo colInfo2 = new ColumnInfo(xls, sheet);
colInfo2.ColumnIndexStart = 2;
colInfo2.ColumnIndexEnd = 2;
colInfo2.Width = 15 * 256;
sheet.AddColumnInfo(colInfo2);
ColumnInfo colInfo3 = new ColumnInfo(xls, sheet);
colInfo3.ColumnIndexStart = 3;
colInfo3.ColumnIndexEnd = 3;
colInfo3.Width = 15 * 256;
sheet.AddColumnInfo(colInfo3);
ColumnInfo colInfo4 = new ColumnInfo(xls, sheet);
colInfo4.ColumnIndexStart = 4;
colInfo4.ColumnIndexEnd = 4;
colInfo4.Width = 15 * 256;
sheet.AddColumnInfo(colInfo4);
ColumnInfo colInfo5 = new ColumnInfo(xls, sheet);
colInfo5.C
Ïà¹ØÎĵµ£º
Ò»¡¢ÈçºÎ£ºÊ¹Óà ASP.NET Óï·¨½«·þÎñÆ÷¿Ø¼þÌí¼Óµ½ ASP.NET ÍøÒ³
¿ÉÒÔͨ¹ýÔÚ .aspx ÎļþÖÐÖ±½ÓÉùÃ÷ Web ·þÎñÆ÷¿Ø¼þ½«ËüÌí¼Óµ½Ò³ÖС£
ÒÔÉùÃ÷·½Ê½Ìí¼Ó¿Ø¼þ
A¡¢Èç¹ûÄúλÓÚ¿ÉÊÓ»¯Éè¼ÆÆ÷ÖУ¬ÇëÇл»µ½Ô´±à¼ÊÓͼ¡£
B¡¢½«±íʾ¸Ã¿Ø¼þµÄÔªËؼüÈë .aspx Îļþ¡£ÄúʹÓõľßÌåÓ﷨ȡ¾öÓÚÒªÌí¼ÓµÄ¿Ø¼þ£¬ ......
Ê®¡¢ÒÔ±à³Ì·½Ê½·ÃÎÊ ASP.NET ¿Ø¼þ
1¡¢Web ´°Ìå¿Ø¼þ±êʶ
ASP.NETÍøÒ³ÉϵÄÿһ¸ö¿Ø¼þ¶¼±ØÐëÊÇ¿ÉΨһ±êʶµÄ¡£Í¨³££¬Îª¿Ø¼þµÄ ID ÊôÐÔ·ÖÅäÒ»¸öÖµÀ´Î¨Ò»±êʶ¸Ã¿Ø¼þ¡£¸ÃÖµ½«³ÉΪ¿Ø¼þµÄʵÀýÃû³Æ£¨¼´£¬ÔÚ´úÂëÖÐÒýÓÿؼþËùÒÀ¾ÝµÄÃû³Æ£©¡£ÀýÈ磬Èç¹û½« TextBox ¿Ø¼þµÄ ID ÊôÐÔÉèÖÃΪ Text1£¬Ôò¿ÉÒÔÔ ......
ÈçºÎͨ¹ýASP.NETÀ´ÏÂÔØÎļþ£¬Õâ¸öÎÊÌâÎÒÃǾ³£Óöµ½£¬°Ñ³£Óõķ½·¨×ܽᵽһÆð£¬Ñ§Ï°Ñ§Ï°¡£µ±ÎÒÃÇÒªÈÃÓû§ÏÂÔØÒ»¸öÎļþ£¬×î¼òµ¥µÄ·½Ê½ÊÇͨ¹ýResponse.RedirectÖ¸Á
Response.Redirect("test.doc")
Äú¿ÉÒÔ°ÑÉÏÃæÕâÐÐÖ¸Áî·ÅÔÚButtonµÄClickʼþµ±ÖУ¬µ±Óû§µã»÷°´Å¥Ö®ºó£¬ÍøÒ³¾Í»á±»×ªÖ·µ½¸Ãwordµµ£¬Ôì³ÉÏÂÔصÄЧ¹û¡ ......
ÔÚASP.NET ÖÐʵÏÖµ¥µãµÇ¼
³ö×Ô£º¡¾ÃÏÏÜ»áÖ®¾«²ÊÊÀ½ç¡¿ ·¢²¼ÈÕÆÚ£º2005Äê1ÔÂ27ÈÕ 8µã48·Ö0Ãë
ÓÉÓÚijЩÔÒò£¬ÔÚÎÒÃǵÄÓ¦ÓÃÖлáÓöµ½Ò»¸öÓû§Ö»ÄÜÔÚÒ»¸öµØ·½µÇ¼µÄÇé¿ö£¬Ò²¾ÍÊÇÎÒÃÇͨ³£Ëù˵µÄµ¥µãµÇ¼¡£ÔÚASP.NETÖÐʵÏÖµ¥µãµÇ¼ÆäʵºÜ¼òµ¥£¬ÏÂÃæ¾Í°ÑÖ÷ÒªµÄ·½·¨ºÍÈ«²¿´úÂë½øÐзÖÎö¡£
ʵÏÖ˼·
ÀûÓÃCacheµÄ¹¦ÄÜ ......