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

JavaÀûÓÃxml½«´óÅúÁ¿Êý¾Ýµ¼³öµ½excelµÄÒ»¸ö·½·¨

±ÊÕßÔÚJava¿ª·¢Öг£³£»áÓöµ½½«Êý¾Ý¿âÊý¾Ýµ¼³öµ½ExcelµÄÒªÇ󣬱ÈÈçÔÚÎÒµÄÒ»¸öÏîÄ¿ÖУ¬¿Í»§ÒªÇóËùÓвéѯ½á¹û¶¼¿ÉÒÔµ¼³öµ½Excel£¬¶ÔÓÚÊý¾ÝÁ¿²»´óµÄ£¨¼¸ÍòÌõ£©£¬Õâ±È½ÏÈÝÒ×ʵÏÖ£¬µ«¶ÔÓÚÊý¾ÝÁ¿±È½Ï´óµÄ£¨¼¸Ê®Íò¼°ÒÔÉÏ£¬¾ßÌåÒª¿´µ¼³öÄÚÈݵÄ×ֶθöÊýºÍ³¤¶Ì£©£¬ÔòÔÚÊý¾Ý¿â²éѯºÍÉú³ÉexcelÎļþÉ϶¼»áÓÐÂé·³¡£
ÒÔÎÒÔÚʵ¼ÊÏîÄ¿ÖеÄÒ»¸ö±íΪÀý£¬Oracle 10gÊý¾Ý¿â£¬Õâ¸ö±íÖÐÓÐ40¶à¸ö×ֶΣ¬ÄÚÈÝÊÇÐÕÃû¡¢ÄêÁä¡¢ÐԱ𡢵ØÖ·¡¢ÉúÈÕ¡¢Ö°Òµ¡¢¹¤×÷µ¥Î»µÈ¸öÈËÐÅÏ¢£¬ÒªÇóµ¼³ö20¶à¸ö×ֶΡ£µ¼³öΪHTMLµÄ±í¸ñµÄ»°£¬¼´Êý¾Ý·ÅÔÚ<table><tr><td>ÖУ¬1ÍòÌõÊý¾Ý´óÔ¼ÐèÒª7.5-8M¡£
¶ÔÓÚÊý¾Ý¿â²éѯ£¬¿ÉÒÔͨ¹ýÒÔ϶þ¸ö·½·¨½â¾ö£º
Ò»¡¢²ÉÓ÷ÖÒ³²éѯ¡£¸ù¾ÝÊý¾Ý¿â·þÎñÆ÷ÐÔÄܺÍÊý¾Ý¿â²Ù×÷Ƶ·±³Ì¶È£¬¾ö¶¨Ã¿Ò³´óС£¬±ÈÈçÿҳ5000µ½10000ÐУ¬Ã¿´Î²éѯ³öÒ»Ò³£¬È»ºóÉú³ÉexcelÎļþ¡£ÕâÖÖ·½·¨µÄȱµãÊÇÐèÒª¶à´Î²éѯÊý¾Ý¿â£¬¶øÊý¾Ý¿â·ÖÒ³²éѯÒòÐèҪʹÓÃÁÙʱ±í£¬ËùÒԱȽϺÄÐÔÄÜ¡£
¶þ¡¢²ÉÓÃÖмä±í¡£Ò»´ÎÐÔ½«²éѯ½á¹û·Åµ½Öмä±íÖУ¬¿É²ÉÓÓselect ...into...”£¬ÔÙ´ÓÖмä±íÖÐÒ»²¿·ÖÒ»²¿·ÖµØÈ¡³öÀ´Éú³Éexcel¡£Ã¿È¡Ò»²¿·Ö£¬¾Í¿ÉÒÔɾ³ýËü£¬»òÕß±ê¼ÇΪ“Òѵ¼³ö”¡£ÕâÖÖ·½·¨ÐèÒª²Ù×÷Öмä±í£¬¹ý³ÌÂ鷳һЩ£¬µ«Ð§Âʺá£
ÏÂÃæÊÇÉú³ÉexcelµÄ¼¸ÖÖ·½·¨(Office 2000ÒÔÉÏʵÏÖ)£º
Ò»¡¢²ÉÓÃPOI»òÕßJXL×é¼þÉú³ÉEXCEL¸ñʽµÄÎļþ¡£ÕâÖÖ·½Ê½¿ÉÒԺܺõؿØÖÆÄÚÈݵĸñʽ£¬È±µãÊÇÕâ¶þÖÖ·½Ê½¶¼Êǽ«EXCELÎļþÕû¸ö¼ÓÔص½ÄÚ´æÖнøÐд¦ÀíµÄ£¬Ïòexcel×·¼ÓÊý¾Ýʱ£¬Ò²ÒªÏÈÈ«²¿¼ÓÔØÔ­Îļþ£¬µ±Êý¾ÝÁ¿´óʱ£¬Éú³ÉµÄEXCELÎļþ»áºÜ´ó£¬¿ÉÄÜ»áÒòÕ¼ÄÚ´æÌ«¶à¶øµ¼ÖÂWEB·þÎñÆ÷ÄÚ´æÒç³ö¡£
¶þ¡¢ÀûÓÃExcelÎļþÖ§³ÖHTML¸ñʽµÄ¹¦ÄÜ£¬¼´Ïµ½«htmlÎļþºó׺Ãû¸ÄΪ.xls£¬¾Í¿ÉÒÔÓÃexcel´ò¿ª¡£ÕâÊÇ×î¼òµ¥µÄ·½·¨£¬ÔÚJspÖÐÖ»Òª½«httpÍ·¸Äһϣ¬Èÿͻ§¶Ëä¯ÀÀÆ÷ÏÂÔØÉú³ÉµÄ.xlsÎļþ£¬¶ø²»ÊÇÈÃä¯ÀÀÆ÷´ò¿ªhtmlÎļþ¾Í¿ÉÒÔÁË¡£JspÎļþ´úÂëÈçÏ£º
view plaincopy to clipboardprint?
<%@ page language="java" contentType="text/html; charset=GBK" %> 
<%  
 String fileName = "export_file_name.xls";//ÏÂÔضԻ°¿òµÄ±£´æÎļþÃû  
 response.setHeader("Content-disposition", "attachment; filename="+ fileName);  
%> 
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmln


Ïà¹ØÎĵµ£º

ÔÚjavaÖÐʹÓÃίÍÐʵÏÖmap/filter

ÔÚjavaÖУ¬¼ÙÉèÄãÓÐÒ»¸öuser ¶ÔÏóµÄlist£¬´Ëuser¶ÔÏó·â×°ÁËÓû§µÄid, first name, last name and age. È»ºóÄãÏëµ÷ÓÃÒ»¸öweb service(eg. UserService.deleteUsersByIds(List<Integer> userIds) ȥɾ³ýÊý¾Ý¿âÖÐÖ¸¶¨µÄÕâЩuser¡£  ÌýÆðÀ´Ëƺõ²»Ì«À§ÄÑ£¬²»ÊÇô? ÄãËùÐèÒªÖ»Êǽ« List<User> ת»¯³ÉList&l ......

java»ù´¡ÈëÃÅѧϰ±Ê¼Ç(Ò»):bubblesortËã·¨¸öÈËѧϰ


public class bubblesort {
 public static void main(String[] args) {
 
   int array[]=new int[]{1,5,9,4,6,2};   
   
   int m;
  
   for(int i=0;i<array.length;i++){
    System.out.print(arra ......

¡¶Effective Java¡·±Ê¼Ç

µÚÒ»ÕÂ ÒýÑÔ
(By wind5shy£ºhttp://blog.csdn.net/wind5shy)
 
µÚ¶þÕ ´´½¨ºÍÏú»Ù¶ÔÏó
(By wind5shy£ºhttp://blog.csdn.net/wind5shy)
µÚ1Ìõ£º¿¼ÂÇÓþ²Ì¬¹¤³§·½·¨´úÌæ¹¹Ô캯Êý
 
ºÃ´¦£º
¾²Ì¬¹¤³§·½·¨ÓÐÃû×Ö£¬±í´ï¸üÇå³þ¡£
²»Ðè´´½¨ÐµĶÔÏó¡£
¿ÉÒÔ·µ»ØÔ­·µ»ØÀàÐ͵Ä×ÓÀàÐͶÔÏó¡£Ó¦Óãº1.·µ»ØÀàÐͶ¨ÒåΪ½ ......

Java Concurrent°üѧϰ֮ConcurrentHashMap

ÔÚJava concurrent°üÖÐÓÐÕâôһ¸ö½Ó¿Ú£ºConcurrentMap¡£
ConcurrentMap¼Ì³Ð×ÔMap£¬²¢Ìí¼ÓÁ˼¸¸öеÄÔ­×Ó·½·¨£º putIfAbsent¡¢remove¡¢replace
Æä·½·¨ÕªÒªÈçÏ£º
 V
putIfAbsent(K key, V value)
          Èç¹ûÖ¸¶¨¼üÒѾ­²»ÔÙÓëij¸öÖµÏà¹ØÁª£¬Ôò½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ