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

java°Ñwordתhtml»òtxt

×î½üÏîÄ¿ÖÐÐèÒªÔÚÒ³ÃæÖÐÔ¤ÀÀwordÎļþ£¬Ëä˵word±¾Éí¾Í¿ÉÒÔÔÚÒ³ÃæÖдò¿ª£¬µ«ÊÇÓÐÁ½¸ö±×¶Ë£¬1ÊÇ¿É¿Í»§¶Ë±ØÐë°²×°word£¬ 2ÊÇ¿Í»§¶ËµÄ»·¾³ÒÔ¼°office°æ±¾ÓвîÒ죬»áÔì³ÉÔ¤ÀÀ²»Îȶ¨¡£ÔÚÍøÉÏÕÒÁËһϣ¬·¢ÏÖpoi¿ÉÒÔ°Ñword×°»»³Étxt,µ«ÊǸñʽ¶¼¶ªÁË,Ö»ÓйâͺͺµÄÎı¾,ÓÖËÑjacob, ÍøÓÑÃÇÖÚ˵·×ç¡, ×îºó»¹ÊÇ×Ô¼ºsourceforgeÉÏÏÂÔØjacob²¢ÔĶÁdoc¸ã¶¨ÁË.
1 goto http://sourceforge.net/projects/jacob-project/ and download latest library of jacob.
ÏÂÔصÄzipÎļþ½á¹¹ÈçÏÂ:
2 intel cpuµÄ»úÆ÷¿½±´jacob-1.15-M3-x86.dllµ½%JAVA_HOME%/jre/bin, AMD cpuµÄ»úÆ÷¿½±´jacob-1.15-M3-x64.dll. ²»¹ýÇëÈ·±£jreĿ¼ÊÇÄãÕýÔÚʹÓõÄjre, ÒòΪÏÖÔںܶàeclipse°æ±¾×Ô¼º´øjre. Õâ¸öÔÚeclipse windows-> preferences -> installed jres¿ÉÒԲ鿴.
3 ¿½±´jacob.jarµ½ÄãÏîĿĿ¼µÄlibÏÂÃ沢ȷ±£¼ÓÈëµ½ÁËclasspath.
×¼±¸¹¤×÷Íê±Ï, ÏÖÔÚ¾Íд³ÌÐòÁË.
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
public class Test {
public static void main(String[] args) {
ActiveXComponent app = new ActiveXComponent("Word.Application");
app.setProperty("Visible", new Variant(false));
Dispatch doc1 = app.getProperty("Documents").toDispatch();
//´ò¿ªaaaa.doc
Dispatch doc2 = Dispatch.invoke(
doc1,
"Open",
Dispatch.Method,
new Object[]{"e:\\aaaa.doc", new Variant(false), new Variant(true)},
new int[1]
).toDispatch();
//Áí´æΪaaaa.html
Dispatch.invoke(
doc2,
"SaveAs",
Dispatch.Method,
new Object[]{
"c:\\aaaa.html",
new Variant(8)//7Ϊtxt¸ñʽ£¬ 8±£´æΪhtml¸ñʽ
},
new int[1]
);
Variant f = new Variant(false);
Dispatch.call(doc2, "Close", f);
}
}
ʹÓÃÆðÀ´ºÜ¼òµ¥.
µ±È»jacob²»¹â¿ÉÒÔ×öword to html, »¹¿ÉÒÔ×öºÜ¶àÊÂÇé:
Jacob is a Java library that lets Java applications communicate with Microsoft Windows DLLs or COM libraries. It does this through the use of a custom DLL that the Jacob Java classes communicate with via JNI. The library and dll isolate the Java developer from the underlying windows libraries so that


Ïà¹ØÎĵµ£º

Java½â»ó1 2ÕÒÁãʱ¿Ì

Ç뿼ÂÇÏÂÃæÕâ¶Î»°ËùÃèÊöµÄÎÊÌ⣺
TomÔÚÒ»¼ÒÆû³µÅä¼þÉ̵깺ÂòÁËÒ»¸ö¼ÛÖµ$1.10µÄ»ð»¨Èû£¬µ«ÊÇËûÇ®°üÖж¼ÊÇÁ½ÃÀÔªÒ»Õŵij®Æ±¡£Èç¹ûËûÓÃÒ»ÕÅÁ½ÃÀÔªµÄ³®Æ±Ö§¸¶Õâ¸ö»ð»¨Èû£¬ÄÇôӦ¸ÃÕÒ¸øËû¶àÉÙÁãÇ®ÄØ£¿
ÏÂÃæÊÇÒ»¸öÊÔͼ½â¾öÉÏÊöÎÊÌâµÄ³ÌÐò£¬Ëü»á´òÓ¡³öʲôÄØ£¿
public class Change{
public static void main(String args[ ......

JavaÃÕÌâ1 6¶àÖØתÐÍ

תÐͱ»ÓÃÀ´½«Ò»¸öÊýÖµ´ÓÒ»ÖÖÀàÐÍת»»µ½ÁíÒ»ÖÖÀàÐÍ¡£ÏÂÃæµÄ³ÌÐòÁ¬ÐøʹÓÃÁËÈý¸öתÐÍ¡£ÄÇôËüµ½µ×»á´òÓ¡³öʲôÄØ£¿
public class Multicast{
public static void main (String[] args){
System.out.println((int)(char)(byte) -1);
}
}
ÎÞÂÛÄãÔõÑù·ÖÎöÕâ¸ö³ÌÐò£¬¶¼»á¸Ðµ½ºÜÃÔ»ó¡£ËüÒÔintÊýÖµ-1¿ªÊ¼£¬È»ºó´ÓintתÐÍÎ ......

²»Ó¦ºöÊÓµÄHTMLÓÅ»¯

Ëæ×ÅWeb2.0¼¼ÊõµÄ²»¶Ï·¢Õ¹£¬WebÇ°¶ËµÄÓÅ»¯Êܵ½Ô½À´Ô½¶àµÄ¹Ø×¢£¬ÌرðÊÇJavaScriptºÍCSSÓÅ»¯µÄÌÖÂÛÒ»Ö±ÊÇÈȵ㣬¹¤¾ßÒ²Ïà¶Ô·á¸»£¬¶ø¶ÔHTMLÓÅ»¯ÔòÓÐËùºöÊÓ£¬×î½ü£¬À´×԰ٶȷºÓû§ÌåÑéÍŶӵŤ³ÌʦMiller£¨chenminliang£©×«ÎÄÇ¿µ÷ÁËHTMLÓÅ»¯µÄÖØÒªÐÔºÍÏà¹Ø¼¼ÇÉ¡£
MillerÊ×ÏȾÙÀý˵Ã÷ÁËHTMLÓÅ»¯ÉÔÏÔºöÂÔµÄÊÂʵ£º
ÔÚSteve Souder ......

c#´ÓhtmlÖлñȡͼƬµØÖ·

 
using System.Text.RegularExpressions;
string ohtml = this.TextBox1.Text;
            System.Text.RegularExpressions.MatchCollection m;
            //ÌáÈ¡×Ö·û´®µÄͼƬ
   ......

HTML ¼òÊ·

HTML ¼òÊ·
      HTML ÊÇ Web ͳһÓïÑÔ£¬ÕâЩÈÝÄÉÔÚ¼âÀ¨ºÅÀïµÄ¼òµ¥±êÇ©£¬¹¹³ÉÁËÈç½ñµÄ Web¡£1991 Ä꣬Tim Berners-Lee ±àдÁËÒ»·Ý½Ð×ö “HTML ±êÇ©”µÄÎĵµ£¬ÀïÃæ°üº¬ÁË´óÔ¼20¸öÓÃÀ´±ê¼ÇÍøÒ³µÄ HTML ±êÇ©¡£ËûÖ±½Ó½èÓà SGML µÄ±ê¼Ç¸ñʽ£¬Ò²¾ÍÊǺóÀ´ÎÒÃÇ¿´µ½µÄ HTML ±ê¼ÇµÄ¸ñʽ¡£±¾ÎĽ²Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ