java¶ÁÈ¡±¾µØexcelÎļþ´úÂë
package cn.com.view.read;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
public class ReadExcel {
public static void main(String[] args){
read("d://air.xls");
}
public static Cell[][] read(String fileName){
Workbook rwb = null;
InputStream is;
try {
is = new FileInputStream(fileName);
rwb = Workbook.getWorkbook(is);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (BiffException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int sheets = rwb.getNumberOfSheets();
Sheet rs = rwb.getSheet(0);
String sheetName = rs.getName();//»ñÈ¡SheetµÄÃû³Æ
int rsColumns = rs.getColumns();//»ñÈ¡Sheet±íÖÐËù°üº¬µÄ×ÜÁÐÊý
Cell[] cellCol = rs.getColumn(1); //»ñȡijһÁеÄËùÓе¥Ôª¸ñ£¬·µ»ØµÄÊǵ¥Ôª¸ñ¶ÔÏóÊý×é
int rsRows = rs.getRows(); //»ñÈ¡Sheet±íÖÐËù°üº¬µÄ×ÜÐÐÊý
Cell[] cellRow = rs.getRow(1); //»ñȡijһÐеÄËùÓе¥Ôª¸ñ£¬·µ»ØµÄÊǵ¥Ôª¸ñ¶ÔÏóÊý×é
// Cell cell = rs.getCell(0, 0); //µÚÒ»¸öÊÇÁÐÊý£¬µÚ¶þ¸öÊÇÐÐÊý
System.out.println("SheetµÄ¸öÊý£º"+sheets);
System.out.println("SheetµÄÃû³Æ£º"+sheetName);
System.out.println("ÁÐÊý£º"+rsColumns);
System.out.println("ÐÐÊý£º"+rsRows);
/* for(int i = 0;i < cellCol.length;i++){
System.out.println("µÚÒ»ÁÐ×ֶΣº"+cellCol[i].getContents());
Ïà¹ØÎĵµ£º
ҪʹÓÃdom4j¶ÁдXMLÎĵµ,ÐèÒªÏÈÏÂÔØdom4j°ü,dom4j¹Ù·½ÍøÕ¾ÔÚ http://www.dom4j.org/
Ä¿Ç°×îÐÂdom4j°üÏÂÔصØÖ·: http://nchc.dl.sourceforge.net/sourceforge/dom4j/dom4j-1.6.1.zip
½â¿ªºóÓÐÁ½¸ö°ü,½ö²Ù×÷XMLÎĵµµÄ»°°Ñdom4j-1.6.1.jar¼ÓÈ빤³Ì¾Í¿ÉÒÔÁË,Èç¹ûÐèҪʹÓÃXPathµÄ»°»¹ÐèÒª¼ÓÈë°üjaxen-1.1-beta-7.jar.
ÒÔÏÂ ......
ÊÂÎñ´¦Àí×ܽá
À´Ô´£ºhttp://space.itpub.net/13956325/viewspace-598381
Ò»¡¢Ê²Ã´ÊÇJava ÊÂÎñ
ͨ³£µÄ¹ÛÄîÈÏΪ£¬ÊÂÎñ½öÓëÊý¾Ý¿â Ïà¹Ø¡£
Ê Îñ±ØÐë·þ´ÓISO/IECËùÖƶ¨µÄACIDÔÔò¡£ACIDÊÇÔ×ÓÐÔ£¨atomicity£©¡¢Ò»ÖÂÐÔ£¨consistency£©¡¢¸ôÀëÐÔ £¨isolation£©ºÍ³Ö¾ÃÐÔ£¨durability£©µÄËõд¡£ÊÂÎñµÄÔ×ÓÐÔ±íʾÊÂÎñ ......
javaÉú³Éexcel±í¸ñ£¬ÒÔÇ°Ö»ÖªµÀPOI£¬ÕâÊÇApacheµÄ¿ªÔ´ÏîÄ¿£¬±¾À´ÊÇÒ»Ì׵ģ¬°üÀ¨word£¬µ«ÊÇÒòΪwordµÄ¸´ÔÓÐÔ£¬ÒÔ¼°¿ª·¢ÈËÔ±µÄȱ·¦£¬ºÃÏñ»ù±¾Í£ÖÍÁË¡£Ö»ÓÐExcel×öµÄ»¹Ëã±È½ÏÍêÕû£¬ÓÃÆðÀ´±È½ÏÇáËÉ¡£
ºóÀ´ÒòΪ×öÏîÄ¿µÄ¹Øϵ£¬ÖªµÀÁË»¹ÓиöJXL£¨java excel£©£¬Ò²ÊǸö¿ªÔ´ÏîÄ¿£¬ÓÃÆðÀ´µÄ¸Ð¾õ¸úPOIºÜÀàËÆ£¬ÒòΪ ......
http://blog.csdn.net/hbcui1984/archive/2009/12/10/4980805.aspx
Ò»¡¢¸ÅÊö
JNI(java native interface)£¬JAVA±¾µØ½Ó¿Úµ÷Óã¬Ä¿µÄÊÇΪÁËJAVA¿ÉÒÔµ÷Óñ¾µØ³ÌÐò£¬Ö÷ÒªÓŵãÓУº
Ìá¸ßЧÂÊ£¬½â¾öÐÔÄÜÎÊÌâ
·ÀÖ¹·´±àÒ룬Ìá¸ßºËÐÄ´úÂ밲ȫÐÔ
ÔöÇ¿±¾»ú½Ó¿Úµ÷ÓÃ
ǶÈëʽ¿ª·¢Ó¦ÓÃ
ÈçÏÂͨ¹ýÒ»¸ö×î¼òµ¥µÄÐ ......