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

asp.net²Ù×÷word


http://www.cnblogs.com/jinglelin/archive/2005/09/02/228486.html 
Éæ¼°µ½asp.net²Ù×÷wordµÄÎÊÌâ
½ñÄêÂ½ÐøÓÖÅöµ½²Ù×÷excel¡¢wordµÈofficeÎĵµ
ʹÓõͼÊÇInteropÏà¹Ødll£¬´ò¿ªofficeÏà¹Ø½ø³Ì½øÐвÙ×÷
ΪÃâÍü¼Ç£¬½«Ïà¹ØtipÕûÀíÈçÏ£º
1. ÒýÓÃÎļþ,¼¸¸ödll´ò°üÁË
2. ²Ù×÷word´úÂëʾÀý:
using ImportExportToOffice;
using Microsoft.ApplicationBlocks.Data;
protected void btnJianJie_Click(object sender, EventArgs e)
{
string sYear = DropDownList2.SelectedValue;
string sMonth = DropDownList1.SelectedValue;
string sDate1 = String.Format("{0}-{1}-{2}", sYear, sMonth, "1");
string sDate2 = String.Format("{0}-{1}-{2}", sYear, sMonth, System.DateTime.DaysInMonth(int.Parse(sYear), int.Parse(sMonth)).ToString());
word = new ImportExportToWord();
string sTmpUrl = "../Report/" + Guid.NewGuid().ToString() + ".Doc";
string sTmpFile = Server.MapPath(sTmpUrl);
string sModelDoc = Server.MapPath("../Report/¹ú¼ÊÂþÓμò±¨Ä£°å.doc");
System.IO.File.Copy(sModelDoc, sTmpFile, true);
try
{
word.Open(sTmpFile);
object sBookMark = "";
//GSM À´·Ãǰʮ ·Ö¹«Ë¾
sBookMark = "GSM_1";
if (word.Document.Bookmarks.Exists(sBookMark.ToString()))
{
word.Document.Bookmarks.get_Item(ref sBookMark).Select();
string sSql = "SELECT TOP 10 t1.ToCarrier, COUNT(t1.ToCarrier) AS Num, t2.ShortName AS Name" +
" from BiteGSM t1 INNER JOIN" +
" BranchInfo t2 ON t1.ToCarrier = t2.ID" +
" INNER JOIN DispatchInfo t3 ON t1.DispatchID = t3.ID" +
" Where t3.SendTime >='" + sDate1 + "'" +
" And t3.SendTime <='" + sDate2 + "'" +
" And t1.SimType=1" +
" GROUP BY t1.ToCarrier, t2.ShortName" +
" ORDER BY COUNT(t1.ToCarrier) DESC";
SqlDa


Ïà¹ØÎĵµ£º

ÀûÓÃASP.NETʵÏÖwebÌ×´ò

×î½ü£¬Òª°ÑÒ»¸öC/S½á¹¹µÄ³ÌÐò¸Ä³ÉB/S½á¹¹¡£ÆäÖоÍÓöµ½ÁË´òÓ¡µÄÎÊÌâ¡£Ñо¿ÁËһϣ¬webÏ´òÓ¡·½·¨´ó¸ÅÓÐÕâô¼¸ÖÖ£º
1¡¢ÀûÓÃIEÖ±½Ó´òÓ¡£¬ÕâÖÖ·½Ê½×î·½±ã£¬µ«ÊÇ¿ØÖÆÄÜÁ¦½Ï²î¡£
2¡¢ÀûÓÃACTIVE¿Ø¼þ£¬¿ÉÒÔ×Ô¼º×öÒ»¸öIEµÄ¿Ø¼þÀ´¿ØÖÆ´òÓ¡¡£
3¡¢Ë®¾§±¨±íµÈµÚÈý·½¹¤¾ß£¬¹ºÂò¼Û¸ñ°º¹ó¡£
    ¸ù¾ÝÎÒµÄÐèÇóÇé¿ö£¬ÓÃIEÖ ......

¡¾×ª¡¿ASP.NETÖг£Óõ½µÄ27¸öº¯Êý¼¯

1¡¢DateTime Êý×ÖÐÍ
ÒÔÏÂÊÇÒýÓÃÆ¬¶Î£º
System.DateTime currentTime=new System.DateTime();
1.1 È¡µ±Ç°ÄêÔÂÈÕʱ·ÖÃë currentTime=System.DateTime.Now;
1.2 È¡µ±Ç°Äê int Äê=currentTime.Year;
1.3 È¡µ±Ç°Ô int ÔÂ=currentTime.Month;
1.4 È¡µ±Ç°ÈÕ int ÈÕ=currentTime.Day;
1.5 È¡µ±Ç°Ê± int ʱ=currentTi ......

Asp.Net 2.0µÄProfile

ÔÚMembership±íÖпÉÒԴ洢һЩÓû§µÄ»ù±¾ÐÅÏ¢£¬µ«ÓеÄʱºò£¬ÎÒÃÇÐèÒª¼Ç¼µÄÓû§ÐÅÏ¢Ô¶Ô¶²»Ö¹Membership±íÖÐÌṩµÄÕâЩ£¬ÈçQQ¡¢MSN¡¢¼Òͥסַ¡¢ÁªÏµµç»°µÈµÈ¡£ÄÇÈçºÎ°ÑÕâЩÓû§ÐÅÏ¢¼Ç¼µ½Êý¾Ý¿âÖÐÄØ£¿ÔÚasp.net2.0ÖÐΪÎÒÃÇÌṩÁ˸öÐÔÉèÖõŦÄܨD¨DProfile¡£ÏÂÃæ¿´Ò»ÏÂProfileµÄ¼¸¸öÌØÕ÷£º
1) Profile¸ù¾Ýÿ¸öÓû§´æ´¢¸÷×Ôµ ......

asp.netÉú³ÉÊý×Ö¡¢×ÖÄ¸Ëæ»úÊý

 char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ