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

½â¾öÓйØExt Gridµ¼³öExcelÔÚJSPµÈ»·¾³Öв»¿ÉÓõÄÎÊÌâ


http://www.ajaxbbs.net/post/extjs/10.html
ÓйØExtGridµ¼³öExcelµÄʵÏÖ·½Ê½£¬ÍøÉÏÒѾ­Óкܶ࣬¹Ù·½Ò²¸ø³öÁËÒ»¸ö·½°¸£¬´úÂë²»ÊǺÜÍêÉÆ£¬²»¹ýÒѾ­ÓиßÈ˶ÔÕâ¸ö½øÐÐÁËÐÞÕý¡£¾ßÌåʵÏÖ·½Ê½¼°´úÂëÎÒÕâÀï¾Í²»ÔÙ¶à˵ÁË£¬´ó¼Ò¿ÉÒԲο´£º
http://www.dojochina.com/index.php?q=node/1254
£¬¸½¼þ£º
gridToExcel.js.txt
Æä»ù±¾Ë¼ÏëÊÇ£º
¿Í»§¶Ë¸ù¾ÝGridÊý¾ÝÉú³ÉExcel¸ñʽµÄXMLÊý¾Ý£¬È»ºó·¢Ë͵½Ò»¸ö·þÎñ¶ËÎļþ£¬·þÎñ¶ËÎļþͨ¹ýÉ趨Content-TypeÀ´ÊµÏÖExcelµÄÏÂÔØ¡£
ÆäÖГµ¼³öExcel”°´Å¥µã»÷Ö´ÐеĴúÂëÈçÏ£º
var
 vExportContent = grid.getExcelXml(); 
if
 (Ext.isIE6 || Ext.isIE7 || Ext.isSafari || Ext.isSafari2 || Ext.isSafari3) { 
    if
 (! Ext.fly('frmDummy'
)) { 
        var
 frm = document
.createElement('form'
); 
        frm.id = 'frmDummy'

        frm.name = id; 
        frm.className = 'x-hidden'

        document
.body.appendChild(frm); 
    } 
    Ext.Ajax.request({ 
        url: '/exportexcel.php'

        method: 'POST'

        form: Ext.fly('frmDummy'
), 
        callback: function
(o, s, r) { 
            //alert(r.responseText);
 
        }, 
        isUpload
: true

        params: {exportContent


Ïà¹ØÎĵµ£º

JSP¾Å´óÄÚÖöÔÏó

      Ò»¡¢page ¶ÔÏó
¡¡¡¡page¶ÔÏó´ú±íJSP±¾Éí£¬¸ü׼ȷµØ˵Ëü´ú±íJSP±»×ªÒëºóµÄServlet£¬Ëü¿ÉÒÔµ÷ÓÃServletÀàËù¶¨ÒåµÄ·½·¨¡£
¡¡¡¡¶þ¡¢config ¶ÔÏó
¡¡¡¡config ¶ÔÏóÀï´æ·Å×ÅһЩServlet ³õʼµÄÊý¾Ý½á¹¹¡£
¡¡¡¡config ¶ÔÏóʵÏÖÓÚjavax.servlet.ServletConfig ½Ó¿Ú£¬Ëü¹²ÓÐÏÂÁÐËÄÖÖ·½·¨£º
......

MyEclipse¸ü¸Äjsp±à¼­Ê±×ÖÌå

     Ò»Ö±ÒÔÀ´Ê¹ÓÃMyeclipse±à¼­Ê±£¬¸Ð¾õÔ­ÓеÄ×ÖÌå´óСºÜ²»ÊÊÓ¦£¬ÓÚÊÇÔÚÍøÉÏËÑÁ˹ØÓÚÔÚMyEclipseÖÐÔõÑùÐÞ¸Ä×ÖÌå´óС£¬ºÜ¶à¶¼ÊÇʹÓÃwindow-preferences-general-apperaence-colors and fonts-java-java edditor text font À´ÐÞ¸Ä×ÖÌå¡£
    ʹÓÃÕâ¸ö·½·¨ËäȻдÀàÎļþÀïÃæµÄ´óС¶¼¸ü¸ü¸ ......

JSP±à³Ì½ø¶ÈÌõÉè¼ÆʵÀý

Ðí¶àWebÓ¦Óá¢ÆóÒµÓ¦ÓÃÉæ¼°µ½³¤Ê±¼äµÄ²Ù×÷£¬ÀýÈ縴ÔÓµÄÊý¾Ý¿â²éѯ»ò·±ÖصÄXML´¦ÀíµÈ£¬ËäÈ»ÕâЩÈÎÎñÖ÷ÒªÓÉÊý¾Ý¿âϵͳ»òÖмä¼þÍê³É£¬µ«ÈÎÎñÖ´ÐеĽá¹ûÈÔ¾ÉÒª½èÖúJSP²ÅÄÜ·¢Ë͸øÓû§¡£±¾ÎĽéÉÜÁËÒ»ÖÖͨ¹ý¸Ä½øÇ°¶Ë±íÏÖ²ãÀ´¸ÄÉÆÓû§¸Ð¾õ¡¢¼õÇá·þÎñÆ÷¸ºÔصİ취¡£
µ±JSPµ÷ÓÃÒ»¸ö±ØÐ볤ʱ¼äÔËÐеIJÙ×÷£¬ÇҸòÙ×÷µÄ½á¹û²»ÄÜ£¨ÔÚ·þÎñ ......

tomcat¡¢JDKºÍJSPÅäÖÃ

¾­³£¿´µ½Ðí¶àÈËÎÊÈçºÎÅäÖÃJDKºÍJSP£¬ÏÖÔÚÎÒ°Ñ·½·¨×ܽáÏ£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
µÚÒ»²½£ºÏÂÔØjdkºÍtomcat
µÚ¶þ²½£º°²×°ºÍÅäÖÃÄãµÄjdkºÍtomcat£ºÖ´ÐÐjdkºÍtomcatµÄ°²×°³ÌÐò£¬È»ºóÉèÖð´ÕÕ·¾¶½øÐа²×°¼´¿É¡£
1.°²×°j2sdkÒÔºó£¬ÐèÒªÅäÖÃһϻ·¾³±äÁ¿£¬ÔÚÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±äÁ¿ÖÐÌí¼ÓÒÔÏ»· ......

Ä¿Ç°×îºÃµÄjsp·ÖÒ³¼¼Êõ£¨×ªÔØ£©

      ÔÚʹÓÃÊý¾Ý¿âµÄ¹ý³ÌÖУ¬²»¿É±ÜÃâµÄÐèҪʹÓõ½·ÖÒ³µÄ¹¦ÄÜ£¬¿ÉÊÇJDBCµÄ¹æ·¶¶Ô´ËȴûÓкܺõĽâ¾ö¡£¶ÔÓÚÕâ¸öÐèÇóºÜ¶àÅóÓѶ¼ÓÐ×Ô¼ºµÄ½â¾ö·½°¸£¬±ÈÈçʹÓÃVectorµÈ¼¯ºÏÀàÏȱ£´æÈ¡³öµÄÊý¾ÝÔÙ·ÖÒ³¡£µ«ÕâÖÖ·½·¨µÄ¿ÉÓÃÐԺܲÓëJDBC±¾ÉíµÄ½Ó¿ÚÍêÈ«²»Í¬£¬¶Ô²»Í¬ÀàÐ͵Ä×ֶεÄÖ§³ÖÒ²²»ºÃ¡£ÕâÀïÌṩÁËÒ»Ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ