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

javaµ¼Èëµ¼³öexcel²Ù×÷(jxl)

¹Ø¼ü×Ö: java excel jxl.jar
jxl.jar °ü
ÏÂÔØµØÖ·:
ÕæÊµÏÂÔØµØÖ·:
ÍøÕ¾É϶ÔËüµÄÌØÕ÷ÓÐÈçÏÂÃèÊö£º
¡ñ Ö§³ÖExcel 95-2000µÄËùÓа汾
¡ñ Éú³ÉExcel 2000±ê×¼¸ñʽ
¡ñ Ö§³Ö×ÖÌå¡¢Êý×Ö¡¢ÈÕÆÚ²Ù×÷
¡ñ Äܹ»ÐÞÊε¥Ôª¸ñÊôÐÔ
¡ñ Ö§³ÖͼÏñºÍͼ±í
Ó¦¸Ã˵ÒÔÉϹ¦ÄÜÒѾ­Äܹ»´óÖÂÂú×ãÎÒÃǵÄÐèÒª¡£×î¹Ø¼üµÄÊÇÕâÌ×APIÊÇ´¿JavaµÄ£¬²¢²»ÒÀÀµWindowsϵͳ£¬¼´Ê¹ÔËÐÐÔÚLinuxÏ£¬ËüͬÑùÄܹ»ÕýÈ·µÄ´¦ÀíExcelÎļþ¡£ÁíÍâÐèҪ˵Ã÷µÄÊÇ£¬ÕâÌ×API¶ÔͼÐκÍͼ±íµÄÖ§³ÖºÜÓÐÏÞ£¬¶øÇÒ½ö½öʶ±ðPNG¸ñʽ¡£
´î½¨»·¾³
½«ÏÂÔØºóµÄÎļþ½â°ü£¬µÃµ½jxl.jar£¬·ÅÈëclasspath£¬°²×°¾ÍÍê³ÉÁË¡£
»ù±¾²Ù×÷
Ò»¡¢´´½¨Îļþ
ÄâÉú³ÉÒ»¸öÃûΪ“²âÊÔÊý¾Ý.xls”µÄExcelÎļþ£¬ÆäÖеÚÒ»¸ö¹¤×÷±í±»ÃüÃûΪ“µÚÒ»Ò³”£¬´óÖÂЧ¹ûÈçÏ£º
Java´úÂë
/*
* Created on Dec 30, 2007
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package JExcelTest.standard;
import java.io.*;
import jxl.*;
import jxl.write.*;
/**
* @author Ken
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class CreateXLS {
public static void main(String[] args) {
try {
//open file.
WritableWorkbook book = Workbook.createWorkbook(new File("d:/Test.xls"));
//create Sheet named "Sheet_1". 0 means this is 1st page.
WritableSheet sheet = book.createSheet("Sheet_1", 0);
//define cell column and row in Label Constructor, and cell content write "test".
//cell is 1st-Column,1st-Row. value is "test".
Label label = new Label(0, 0, "test");
//add defined cell above to sheet instance.
sheet.addCell(label);
//create cell using add numeric. WARN:necessarily use integrated package-path, otherwise will be throws path-error.
//cell is 2nd-Column, 1st-Row. value is 789.123.
jxl.write.Number number = new jxl.write.Number(1, 0, 789.123);
//add defined cell above to sheet instance.
sheet.addCell(number);
//add defined all cell above to case.
book.write()


Ïà¹ØÎĵµ£º

Java¼¯ÈºÖ®session¹²Ïí½â¾ö·½°¸

Java¼¯ÈºÖ®session¹²Ïí½â¾ö·½°¸
À´Ô´£ºhttp://blog.csdn.net/crskyp/archive/2009/11/19/4836685.aspx
Ëæ×Å»¥ÁªÍøµÄÈÕÒæ×³´ó,ÍøÕ¾µÄpvºÍuv³ÉÏßÐÔ»òÕßÖ¸Êý±¶µÄÔö¼Ó.µ¥·þÎñÆ÷µ¥Êý¾Ý¿âÔçÒѾ­²»ÄÜÂú×ãʵ¼ÊÐèÇó.±ÈÈçÏñÊ¢´ó,ÌÔ±¦ÕâÑùµÄ´óÐÍÍøÂ繫˾,¸üÊÇÈç´Ë. 
    ¼¯Èº,Ò²¾ÍÊÇÈÃÒ»×鼯Ëã»ú·þÎñÆ÷Эͬ¹¤×÷ ......

JavaÖÐsplitҪעÒâµÄÎÊÌâ

ÔÚJAVAÖУ¬ ÔÚʹÓÃString.split·½·¨·Ö¸ô×Ö·û´®Ê±£¬µ«Òª×¢ÒâÓÐЩ×Ö·û²»ÄÜÖ±½ÓÓõÄ,·Ö¸ô·ûÈç¹ûÓõ½Ò»Ð©ÌØÊâ×Ö·û,±ÈÈç "| "
,"*",µÈ·ñÔò»á³öÏÖÎÊÌ⣬ÒÔǰ¸ÕÓÃʱ¾ÍÒòΪÕâ¸öÎÊÌâ¶ø¿´Á˰ëÌìµÄ´úÂë¡£
public String[] split(String regex)
Splits this string around matches of the given regular expression. 
&nbs ......

JavaÖе÷Ó÷þÎñ¶Ë½Å±¾

   
   Runtime runtime = Runtime.getRuntime();// ¿ªÊ¼µ÷Ó÷þÎñ¶Ë½Å±¾
   Process process = runtime.exec("encode.sh /home/tomcat6/kgedata/note_not_encode/ /home/tomcat6/kgedata/note_encode/");
 int exitVal = process.waitFor();
 System.out.prin ......

java ÖÐnative¹Ø¼ü×Ö

native¹Ø¼ü×ÖÓ÷¨
nativeÊÇÓëC++ÁªºÏ¿ª·¢µÄʱºòÓõģ¡java×Ô¼º¿ª·¢²»Óõģ¡
ʹÓÃnative¹Ø¼ü×Ö˵Ã÷Õâ¸ö·½·¨ÊÇÔ­Éúº¯Êý£¬Ò²¾ÍÊÇÕâ¸ö·½·¨ÊÇÓÃC/C++ÓïÑÔʵÏֵ쬲¢ÇÒ±»±àÒë³ÉÁËDLL£¬ÓÉjavaÈ¥µ÷Óá£
ÕâЩº¯ÊýµÄʵÏÖÌåÔÚDLLÖУ¬JDKµÄÔ´´úÂëÖв¢²»°üº¬£¬ÄãÓ¦¸ÃÊÇ¿´²»µ½µÄ¡£¶ÔÓÚ²»Í¬µÄƽ̨ËüÃÇÒ²ÊDz»Í¬µÄ¡£ÕâÒ²ÊÇjavaµÄµ×²ã»úÖÆ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ