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

java ʵÏÖxlsÎļþתxml

package com.dongyang;
/*
 * ¶Áxlsдxml
 */
import java.io.FileOutputStream;
 
import java.io.FileInputStream;  
 
import java.io.InputStream;  
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
 
import jxl.Cell;  
 
import jxl.Sheet;  
 
import jxl.Workbook;  
 
public class Excel2xml   
 
{  
 
  public static void main(String[] args)   
 
    {  
      Excel2xml e = new Excel2xml();
      e.ret();
    }  
 
  public void ret(){
     
      jxl.Workbook readwb = null;  
     
      try   
      {  
          //¹¹½¨Workbook¶ÔÏó, Ö»¶ÁWorkbook¶ÔÏó  
          //Ö±½Ó´Ó±¾µØÎļþ´´½¨Workbook  
          InputStream instream = new FileInputStream("E:/123.xls");  
          readwb = Workbook.getWorkbook(instream);  
          //SheetµÄϱêÊÇ´Ó0¿ªÊ¼  
          //»ñÈ¡µÚÒ»ÕÅSheet±í  
          Sheet readsheet = readwb.getSheet(0);  
          //»ñÈ¡Sheet±íÖÐËù°üº¬µÄ×ÜÁÐÊý  
          int rsColumns = readsheet.getColumns();  
         //»ñÈ


Ïà¹ØÎĵµ£º

JavaÖÐʵÏÖ Client

1.Ïà¹ØÀàµÄ½éÉÜ
·þÎñÆ÷³ÌÐò²»Í¬ÓÚ¿Í»§»ú¶ËµÄ³ÌÐò£¬ËüÐèÒª³õʼ»¯Ò»¸ö¶Ë¿Ú½øÐмàÌý£¬Óöµ½Á¬½Óºô½Ð£¬²ÅÓëÏàÓ¦µÄ¿Í»§»ú½¨Á¢Á¬½Ó¡£Java.net°üµÄServerSocketÀà°üº¬Á˱àд·þÎñÆ÷ϵͳµÄÈ«²¿ËùÐ蹦ÄÜ£¬¶ø¿Í»§¶ËÈí¼þͨ³£Ê¹ÓÃjava.net°üÖеĺËÐÄÀàSocketÓë·þÎñÆ÷µÄij¸ö¶Ë¿Ú½¨Á¢Á¬½Ó¡£
2.µ¥Ï߳̿ͻ§¶Ë³ÌÐò½¨Á¢²½Ö裺
1£©½¨Á¢socket£ ......

Java°²È«¹ÜÀíÆ÷Security Manager

    ÿ¸öJavaÓ¦Óö¼¿ÉÒÔÓÐ×Ô¼ºµÄ°²È«¹ÜÀíÆ÷£¬ËüÊÇ·À·¶¶ñÒâ¹¥»÷µÄÖ÷Òª°²È«ÎÀÊ¿¡£°²È«¹ÜÀíÆ÷ͨ¹ýÖ´ÐÐÔËÐн׶μì²éºÍ·ÃÎÊÊÚȨ£¬ÒÔʵʩӦÓÃËùÐèµÄ°²È«²ßÂÔ£¬´Ó¶ø±£»¤×ÊÔ´ÃâÊܶñÒâ²Ù×÷µÄ¹¥»÷¡£Êµ¼ÊÉÏ£¬°²È«¹ÜÀíÆ÷¸ù¾ÝJava°²È«²ßÂÔÎļþ¾ö¶¨½«ÄÄ×éȨÏÞÊÚÓèÀࡣȻ¶ø£¬µ±²»¿ÉÐŵÄÀàºÍµÚÈý·½Ó¦ÓÃʹÓÃJVMʱ£¬Java°²È«¹Ü ......

java ֪ʶµã×ܽá

//java½âÎö.mdbÎļþµÄ±íÃû¼¯ºÏ 
this.tableList.clear();
  
  conn = null;
  st = null;
  rs = null;
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  String url ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbName;// ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ