asp.netµÄcom·½Ê½µ¼³öexcel
×î½ü×ö¸öÏîÄ¿£¬ÐèÒªµ¼³öexcel£¬ÒªÖ÷´Ó±íÒ»Æðµ¼³öµÄ£¬¾Í´óÖÂдÁËÒ»¸ö·½·¨£¬¿ÉÄܸñʽ·½Ã滹ÊÇ»á½øÐÐÐ޸ģ¬ÏÈÌù³öÀ´·½±ãÒÔºó²é¿´
ÏîÄ¿ÒýÓÃ΢ÈíexcelµÄcomµÄdll¼´¿É
/// <summary>
/// ¹¦ÄÜ£ºµ¼³öÎļþ£¨Í¨¹ýÊý¾ÝÔ´µ¼³ö,¿ÉÖ÷´Ó±íµ¼³ö£©
/// </summary>
/// <param name="strTitle">ÎļþÃû×Ö</param>
/// <param name="mainDT">Ö÷±íÊý¾ÝÔ´</param>
/// <param name="dtParams">´Ó±íÊý¾ÝÔ´¼¯ºÏ</param>
public static void Export(string strTitle, System.Data.DataTable mainDT, params System.Data.DataTable[] dtParams)
{
GC.Collect();
Application oApp = new Application();
Workbooks oBooks = oApp.Workbooks;
Workbook oBook = oBooks.Add(true);
Worksheet oSheet = (Worksheet)oBook.ActiveSheet;
int _rowIndex = 4;//ÐÐË÷Òý
int _cellIndex = 1;//ÁÐË÷Òý
int _maxCellIndex = 1;//×î´óÁÐË÷Òý
int _mainRowIndex = 4;//Ö÷±íÐÐË÷Òý
//»æÖƱêÌâ
oSheet.Cells[2, 2] = strTitle;
//»æÖÆÖ÷±íÊý¾Ý
foreach (DataColumn col in mainDT.Columns)
{
_cellIndex++;
//ÉèÖÃÒ»ÐÐÁ½ÁÐ
if (_cellIndex > 17)
{
_rowIndex++;
_cellIndex = 2;
}
oSheet.Cells[_rowIndex, _cellIndex] = col.ColumnName+":";
oSheet.get_Range(oSheet.Cells[_rowIndex, _cellIndex], oSheet.Cells[_rowIndex, _cellIndex + 2]).Select();
oSheet.get_Range(oSheet.Cells[_rowIndex, _cellIndex], oSheet.Cells[_rowIndex, _cellIndex + 2]).HorizontalAlignment = XlHAlign.xlHAlignCenterAcrossSelection;
_cellIndex = _cellIndex + 3;
if (col.DataType == System.Type.GetType("System.DateTime"))// ÈÕÆÚ¸ñʽ
{
oSheet.Cells[_rowIndex, _cellIndex] =Convert.ToDateTime(mainDT.R
Ïà¹ØÎĵµ£º
Ç°ÑÔ
ASP.NET MVC×÷Ϊ΢Èí¹Ù·½µÄ.NETƽ̨ÏÂMVC½â¾ö·½°¸£¬×Ôµ®ÉúÆð¾ÍÎüÒýÁËÖÚ¶à.NETƽ̨¿ª·¢ÈËÔ±µÄÑÛÇò¡£ÔÚ¾ÀúÁËÂþ³¤Previewºó£¬ÉϸöÔÂ΢ÈíÖÕÓÚ·¢²¼ÁËÆäbeta°æ¡£Ó¦¸Ã˵£¬Í¨¹ýÎÒÇ×Éíʵ¼ù£¬ÎÒÈÏΪÕâ¸ö¿ò¼ÜµÄÉè¼Æ»¹ÊÇÏ൱ÓÅÐãµÄ£¬ÖÁÉÙ´ÓÒ×ÓÃÐÔÀ´Ëµ£¬ASP.NET MVCÒªÓÅÓÚJavaƽ̨ÉϵÄStrutsºÍStr ......
ÐÂÊÖÈçºÎѧϰc#¡¢asp.net¡¢ado.netºÍ.NET
Èç¹ûÄãÒѾÓн϶àµÄÃæÏò¶ÔÏ󿪷¢¾Ñ飬Ìø¹ýÒÔÏÂÕâÁ½²½£º
µÚÒ»²½¡¡ÕÆÎÕÒ»ÃÅ.NETÃæÏò¶ÔÏóÓïÑÔ£¬C££»òVB.NET¡£
ÔÚûϵͳѧ¹ýÒ»ÃÅÃæÏò¶ÔÏó£¨OO£©ÓïÑÔµÄÇ°ÌáÏÂȥѧASP.NET¡£
ASP.NETÊÇÒ»¸öÈ«ÃæÏò¶ÔÏóµÄ¼¼Êõ£¬²»¶®OO£¬ÄǾø¶Ôѧ ......
ͨ³£ÎÒÃǶ¼Í¨¹ýÏÂÃæµÄ´úÂë»ñµÃIP:
string ip =System.Web.HttpContext.Current.Request.UserHostAddress;
»ò string ip =System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
REMOTE_ADDR ˵Ã÷£º
·ÃÎÊ¿Í»§¶ËµÄ IP µØÖ·¡£
´ËÏîÐÅÏ¢Óû§²»¿ÉÒÔÐ޸ġ£
Èç¹ûÕæµÄ ......
Ëæ×ÅÍøÂç¼¼ÊõµÄ·¢Õ¹£¬Ä¿Ç°¹úÄÚCMSµÄ¿ª·¢ÉÌÔ½À´Ô½¶à£¬¸÷×Ô¶¼ÓÐÆä¶ÀÌصÄÓÅÊÆ£¬´ó¼ÒÔÚÑ¡ÔñµÄʱºò¾õµÃÑÛ»¨çÔÂÒ£¬²»ÖªµÀÑ¡ÔñÄĸö±È½ÏºÃ£¬ÎÒ¸öÈËÈÏΪ¿ªÔ´µÄCMS»¹ÊÇÊʺÏÎÒÃÇѧϰ¼°Ñо¿Ê¹Óã¬Ï±߾ͼ¸¸ö¹úÄÚµÄasp.net¿ªÔ´CMS½øÐмòµ¥½éÉÜ¡£
1.We7 CMS
We7 CMSÊÇÓÉÎ÷²¿¶¯Á¦¿ª·¢µÄÒ»¿î³ä·Ö·¢¾ò»¥ÁªÍøWeb2.0£¨È粩¿Í¡¢RSSµÈ£©µÄÐÅÏ¢× ......