50,673
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
FileInputStream fis = null;
InputStream is = FileTool.getFileInputStream(template);
WritableWorkbook wWorkbook = null;
if (is != null) {
Workbook book = Workbook.getWorkbook(is);
//File tempFile = File.createTempFile("temp", ".xls");//创建新的空文件
File tempFile = new File("e:/temp.xls");
wWorkbook = Workbook.createWorkbook(tempFile, book);
/** 处理【表达式】类型的数据。 **/
//generateExpData(book, wWorkbook, datas);
/** 处理【循环结果集】类型的数据。 **/
//generateEachData(book, wWorkbook, datas);
wWorkbook.getSheet(0).insertRow(0);//----------
wWorkbook.write();
wWorkbook.close();
fis = new FileInputStream(tempFile);