javaµ÷ÓÃcom×é¼þ²Ù×÷wordʹÓÃ×ܽá(jacob)
Ò»¡¢×¼±¸¹¤×÷
ÏÈÁ˽âһϸÅÄJACOB ¾ÍÊÇ JAVA-COM BridgeµÄËõд£¬Ìṩ×Ô¶¯»¯µÄ·ÃÎÊcomµÄ¹¦ÄÜ£¬Ò²ÊÇͨ¹ýJNI¹¦ÄÜ·ÃÎÊwindowsƽ̨ϵÄcom×é¼þ»òÕßwin32ϵͳ¿âµÄ¡£ÕâÊÇÒ»¸ö¿ªÊ¼ÓÚ 1999ÄêµÄ¿ªÔ´ÏîÄ¿µÄ³É¹û£¬ÓкܶàʹÓÃÕ߶ԸÃÏîÄ¿½øÐÐÁËÐ޸ģ¬×ö³öÁË×Ô¼ºµÄ¹±Ïס£
JacobÏÂÔصØÖ·£ºhttp://sourceforge.net/project/showfiles.php?group_id=109543&package_id=118368
ÎÒÔÚÕâÀïÏÂÔØÁËJacob1.14.3ºÍjacob1.9µÄ°æ±¾Á½¸ö°æ±¾
ÕâÀïÏÂÔصÄÊÇÄ¿Ç°×îеÄJacob1.14.3µÄRelease°æ¡£
ÁíÍâjava²Ù×÷word·½Ê½»¹ÓÐ(¸öÈËÈÏΪͨ¹ýjacob×îºÃ£¬×Ô¼º¿ÉÒÔÀ©Õ¹£¬ÍøÉϳýpoiÖ®Í⼸ºõÈ«ÊÇjava-com¼¼ÊõʵÏÖµÄ):
(1):Apache POI - Java API To Access Microsoft Format Files(http://poi.apache.org/);¶Ôword´¦Àí²»¹»Ç¿´¦ÀíExcel¹¦ÄÜ¿ÉÒÔ£¬µ«ÊÇÈ«ÊÇͨ¹ýjavaÍê³ÉµÄ,²»Ðè Òªcom×é¼þÖ§³Ö;
(2):java2word ÊÇÒ»¸öÔÚjava³ÌÐòÖе÷Óà MS Office Word ÎĵµµÄ×é¼þ(Àà¿â)¡£¸Ã×é¼þÌṩÁËÒ»×é¼òµ¥µÄ½Ó¿Ú£¬ÒÔ±ãjava³ÌÐòµ÷ÓÃËûµÄ·þÎñ²Ù×÷Word Îĵµ¡£(ºÃÏóÒ²ÊÇÓõÄjava-com¼¼Êõ);
(3)web¿ª·¢ÓïÑÔ²Ù×÷wordµÄ¹¦ÄÜ×îºÃ»¹ÊÇÓõÚÈý·½µÄ¿Ø¼þ£¬ ¿´¿´Õâ¸öSOAOFFICE£¬»¹¿ÉÒÔʹÓÃjs дVBAÄØ http://www.kehansoft.com/soaoffice/doclist.asp
¶þ¡¢°²×°Jacob
JacobµÄ°²×°·Ç³£µÄ¼òµ¥£¬ÎÒÃǽ⿪ÏÂÔصÄjacob_1.9.zip,ÔÚÎļþ¼ÐÖÐÕÒµ½jacob.dllºÍjacob.jarÁ½¸öÎļþ,Èç¹ûÊÇ Jacob1.14.3ÔòÊÇjacob-1.14.3-x86.dll(32λ,»úºÍjacob-1.14.3-x64.dll(64λ)ºÍ jacob.jarÁ½¸öÎļþ¡£Jacob.dllÖ±½Ó·Åµ½ÏµÍ³µÄsystem32Îļþ¼ÐϾÍÐÐÁË£¬Á¬×¢²á¶¼²»Óõģ¨»òÕß¿½±´µ½jdk»òÕßjreµÄbinÄ¿ ¼ÏÂÒ²ÐУ¬µ±Ç°²âÊÔÎļþËùÔÚµÄĿ¼ҲÐУ¬¾ÍÊÇÖ»ÒªÔÚjava.library.pathÖоͿÉÒÔ£©¡£¶øjacob.jarÉèÖõ½classpathÖÐÈ¥¾Í ¿ÉÒÔÁË£¬»òÕßÔÚIDE¿ª·¢»·¾³µÄ¹¤³ÌÖÐÉèÖÃÀ©Õ¹¿âÒ²Ò»ÑùµÄ,ÎÒÊÇÕâÑùʹÓõĽ«jacob-1.14.3-x86.dll»ò¸´ÖÆ µ½%Tomcat5%\binĿ¼Ï½«jacob.jar¸´ÖƵ½%Tomcot5%\Share\libĿ¼ÏÂ,ÎÒʹÓùý³ÌÖиоõ·Åµ½ÕâÀïÊÇÒ»¸ö×îÖÕ½â¾ö °ì·¨£¬µ±Äã·ÅÄĶ¼ÓÐÎÊÌâµÄʱºò¡£ÎÒÕâÑùÓÃÖ®ºóÔÙûÓгö¹ýÒòΪϵͳ²»Ò»Ñù³öÏֵĸ÷ÖÖ¸÷ÑùµÄÎÊÌ⣬µ±È»Äã×÷µÄÊÇwebµÄÏîÄ¿¡£
×¢ÒâʹÓÃjacobһдҪ°²×°word£¬ÎÒ×°µÄword2003£¬Èç¹ûÊDzÙ×÷word2007¾Í²»ÓÃjacobÁË£¨ºÃÏñÕâ·½ÃæµÄAPI£©¡£
¶Ôjacob.dll¼¸ÖÖÅäÖ÷½·¨ £¨ÍøÉÏ¿´µ½£©£º
2008-07-31 11:59:49
1¡¢°Ñjacob.dllÎļþ£¬¸´ÖƵ½ windows\system32 Ŀ¼Ï¡££¨×¢£ºÎÒÓõÄʱºòÕâ¸ö·½·¨²»ÄÜÔËÐУ©
2¡¢ °Ñ
Ïà¹ØÎĵµ£º
JDK1.4ÖÐ
Map map = new HashMap();
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
Object key = entry.getKey();
Object value = entry.getValue();
}
JDK1.5ÖÐ,Ó¦ÓÃÐÂÌØÐÔFor-EachÑ»·
Map m = new HashMap(); ......
1.³éÏó£º
¡¡¡¡³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¡¡¡¡¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£¬²¢ÇÒÔÊÐíºÍ¹ÄÀøÀàµÄÖØÓã¬ËüÌṩÁËÒ»ÖÖÃ÷È· ......
´«ÖDz¥¿ÍµÄJAVA SE¸ß¼¶ÊÓƵ2 IO ×Ôѧ±Ê¼Ç:
FileÀࣺ
1.IO°üÖÐΨһ´ú±í´ÅÅÌÎļþ±¾ÉíÐÅÏ¢µÄÀ࣬¶ø²»ÊÇÎļþÖÐÄÚÈÝ¡£
2.´´½¨¡¢É¾³ý¡¢ÖØÃüÃûÎļþµÈ·½·¨¡£
3.JavaÖÐĿ¼±»µ±×÷Ò»ÖÖÌØÊâÎļþʹÓã¬list·½·¨·µ»ØËùÓÐ×ÓĿ¼ºÍÎļþ¡£
4.UnixÏ·¾¶· ......
ÓÃÁËÕâ¸ö£¬MyEclipseÀï¾Í²»»á±¨ÄÇЩ¾¯¸æÁË£¬¿´ÆðÀ´Æ¯ÁÁ¶àÁË
³£Óõģº
@SuppressWarnings("unchecked"),·ºÐÍ
@SuppressWarnings("deprecation"), deprecated·½·¨
@SuppressWarnings(value={"deprecation","unchecked"}) Ë«Ñ¡
@SuppressWarnings("serial"), ÐòÁл¯
......
ÒòΪÏîÄ¿ÓиöÐèÇó£¬ÒªÇóÄܹ»ÔÚij¸öÔ¤¶¨Ê±¼ä¶ÔÌض¨±¨±í½øÐÐ×Ô¶¯´òÓ¡¡£±¨±íµÄÐÎʽÖ÷ÒªÊÇexcel¡£Èç¹ûÊÇc++»òÕßc#ʲôµÄ£¬¼òÖ±ÊÇС²ËÒ»µú¡£¿Éϧ£¬Æ«Æ«ÊÇjavaʵÏÖ¡£²¢ÇÒ£¬ÕâÓÖ²»Í¬ÓÚ³£¼ûµÄÒ³ÃæÊÖ¹¤´òÓ¡£¬¿ÉÒÔͨ¹ýjavascriptµ÷ÓôòÓ¡»úÀ´ÊµÏÖ¡£ÓÚÊǺõ£¬¿ªÊ¼ÃþË÷ÈçºÎʵÏָù¦ÄÜ¡£
Ê×Ï ......