Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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()


Ïà¹ØÎĵµ£º

base64µÄjavaʵÏÖ·½·¨

package cn.eshore.mismp.sms.ws.send;
public class Base64 {
/**
* ½«Ô­Ê¼Êý¾Ý±àÂëΪbase64±àÂë
*/
static public char[] encode(byte[] data) {
char[] out = new char[((data.length + 2) / 3) * 4];
for (int i = 0, index = 0; i < data.length; i += 3, index += 4) {
boolean quad = false ......

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

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

java ÐòÁл¯Óë³Ö¾Ã»¯

Ê×ÏÈҪ˵µÄÊÇ,HibernateÖÐORMÀï¶ÔÓ¦µÄÓ³ÉäÎļþBEAN,±ØÐëʵÏÖÐòÁл¯.ÒòΪBEANÀïµÄÊý¾ÝÐèÒª´æÈëÊý¾Ý¿â(Ҫת»¯Îª¶þ½øÖƱ£´æ),½øÐдæÈ¡¹¤×÷.
        JAVAÀàµÄÊý¾Ý ,Èç¹ûÒª½øÐÐÏà¹ØµÄ´æ´¢¹¤×÷(ÈçдÎļþ,ÍøÂç´«Êä,дÊý¾Ý¿âµÈ),ÄÇôÕâ¸öÊý¾ÝµÄÀà ¾Í±ØÐëʵÏÖÐòÁл¯½Ó¿Ú (java.io.Serializable ......

javaÖÐfloat/double¸¡µãÊýµÄ¼ÆËãʧ¾«¶ÈÎÊÌâ


½ñÌìÔÚÊýÖµ¼ÆËãʱÅöµ½Ò»¸öÎÊÌâ.³ÌÐòÈçÏÂ:
  double a = (3.3-2.4)/0.1;
  System.out.println(a);
Äã¿ÉÄÜÈÏΪ½á¹ûºÜ¼òµ¥,²»¾ÍÊÇ9Âï,ÊÇÊÂʵÉÏ,½á¹ûΪ:8.999999998,ÎªÊ²Ã´ÄØ?ÎÒ·­ÔÄÁËһЩ×ÊÁÏ,ÖÕÓÚÕÒ³öÁËÔ­Òò.
Ϊʲô¸¡µãÊý»á¶ªÊ§¾«¶È£¿  
Ê®½øÖÆÊýµÄ¶þ½øÖƱíʾ¿ÉÄܲ»¹»¾«È·
¸¡µãÊý»òÊÇË«¾«¶È¸¡µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ