????4??????EXCEL

// ????Excel????
import  java.io.File;

import  jxl.Workbook;
import  jxl.write.Label;
import  jxl.write.WritableSheet;
import  jxl.write.WritableWorkbook;

public class CreateExcel{
    public static void main(String args[]){
     //Create_Excel c_e = new Create_Excel();
     //c_e.createexcel();
     //System.out.printf("success!!");
   }
}

class Create_Excel{
 public void createexcel(){
  try{
            //  ?????
            WritableWorkbook book = Workbook.createWorkbook(new File("test.xls"));
            //  ???????“????”????????????0??????????
            WritableSheet sheet = book.createSheet("????"??0);
            //  ??Label????????????????????λ???????е????(0??0)
            //  ?????????????test
            Label label1 = new  Label(0??0??"test");
            Label label2 = new  Label(1??1??"test");

            //  ????????????????????????
            sheet.addCell(label1);
            sheet.addCell(label2);

           /*
            * ???????????????????? ???????Number????????·???????????????? ?????λ???????У?????У???555
            */
           jxl.write.Number number = new jxl.write.Number(1??0??555);
           sheet.addCell(number);

            //  д?????????????
           book.write();
           book.close();

       }catch(Exception e){
           System.out.println(e);
       }
 }
}

????5?????EXCEL

// ???Excel????
import  java.io.File;

import  jxl.Cell;
import  jxl.Sheet;
import  jxl.Workbook;

/*
 * ????1:???????????
 * ????2:?????
 * ????3:?????
 * ????????0???
 * ?????:?????????????
 */
public class ReadExcel{
 static String result;
 static Workbook book;
 static Sheet sheet;
    public static void main(String args[]){
     //readExcel(0??1??0);
     excelNum(0);
    }
    public static String readExcel(int no??int row??int line){
     try{
            book = Workbook.getWorkbook(new File("test.xls"));
            //  ????????????????
            sheet = book.getSheet(no);
            //  ???????е???е?????
            Cell cell1 = sheet.getCell(row??line);
            result = cell1.getContents();
            System.out.println(result);
            book.close();
         }catch(Exception e){
            System.out.println(e);
         }
  return result;
    }
  
    //????????
    public static int excelNum(int no){
     int col = 0;
     int row = 0;
     try{
      book = Workbook.getWorkbook(new File("test.xls"));
      sheet = book.getSheet(no);
      //?????????????
      col = sheet.getColumns(); //????
      row = sheet.getRows();  //????
      System.out.println(col+" ??");
      System.out.println(row+" ??");
      book.close();
     }catch(Exception e){
      System.out.println(e);
     }
     return row;
    }
}