package com.qiaozi.excel;
import java.io.*;
import jxl.*;
import jxl.write.*;
public class UpdateExl {
public UpdateExl() {
}
public static void main (String[] args) {
try{
System.out.println("begin");
//Excel获得文件
Workbook wb=Workbook.getWorkbook(new File("D://测试.xls"));
//打开一个文件的副本,并且指定数据写回到愿文件中
WritableWorkbook book=Workbook.createWorkbook(new File("D://测试.xls"),wb);
//添加一个工作表
WritableSheet sheet=book.createSheet("第1页",0);
Label label=new Label(0,0,"china");
sheet.addCell(label);
book.write();
book.close();
}catch(Exception e){
System.out.println(e);
}
System.out.println("end");
}
}