我要实现的内容是这样的 现在已经存在一个excel文件, 我要这个文件里有很多sheet页
通过我传入的条件能确定是哪个sheet页 现在我要把一些数据写入到这个excel文件的 特定sheet页中 我该怎么做?
path = new File(rest.getselectPath()+fileName);
try{
book = Workbook.getWorkbook(path);
workBook = Workbook.createWorkbook(path, book);
}catch(BiffException ee){
ee.printStackTrace();
} 我这么写的 但是文件却给清空了
谁来帮帮我呀
通过我传入的条件能确定是哪个sheet页 现在我要把一些数据写入到这个excel文件的 特定sheet页中 我该怎么做?
path = new File(rest.getselectPath()+fileName);
try{
book = Workbook.getWorkbook(path);
workBook = Workbook.createWorkbook(path, book);
}catch(BiffException ee){
ee.printStackTrace();
} 我这么写的 但是文件却给清空了
谁来帮帮我呀
try {
// 构建Workbook对象, 只读Workbook对象,创建可写入的Excel工作薄
jxl.write.WritableWorkbook wwb = Workbook.createWorkbook(new File(
filePath ));
jxl.write.WritableSheet ws = wwb.createSheet("// 写入Exel工作表
//以下开始写入:
ws.addCell(new jxl.write.Label(0, 1, "test));
wwb.write();
// 关闭Excel工作薄对象
wwb.close();
System.out.print("success");
} catch (Exception e) {
e.printStackTrace();
}
}
jxl根本实现不了我要的结果
因为 我的excel中有一些算法程序 他不支持 呵呵
但是还是给你纷了